Config: show messaging configured state (v2) (#19083)

This commit is contained in:
Michael Geers 2025-02-23 07:23:01 +01:00 • committed by GitHub
parent 21545b92ef
commit c59f1b1ca7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -134,6 +134,10 @@ type Messaging struct {
Services []config.Typed
}
func (c Messaging) Configured() bool {
return len(c.Services) > 0
}
type Tariffs struct {
Currency string
Grid config.Typed

View file

@ -257,7 +257,7 @@ func runRoot(cmd *cobra.Command, args []string) {
valueChan <- util.Param{Key: keys.Hems, Val: conf.HEMS}
valueChan <- util.Param{Key: keys.Influx, Val: conf.Influx}
valueChan <- util.Param{Key: keys.Interval, Val: conf.Interval}
valueChan <- util.Param{Key: keys.Messaging, Val: pushChan != nil}
valueChan <- util.Param{Key: keys.Messaging, Val: conf.Messaging.Configured()}
valueChan <- util.Param{Key: keys.ModbusProxy, Val: conf.ModbusProxy}
valueChan <- util.Param{Key: keys.Mqtt, Val: conf.Mqtt}
valueChan <- util.Param{Key: keys.Network, Val: conf.Network}