1
0
Fork 0

Fix topic spelling

main
Jordan Hotmann 2024-01-10 15:29:51 -07:00
parent aebc001d56
commit f558f4e323
No known key found for this signature in database
GPG Key ID: 01B504170C2A2EA3
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ func handleMessages() {
cleanedState := stateReplacer.Replace(message.Event.Data.NewState.State) cleanedState := stateReplacer.Replace(message.Event.Data.NewState.State)
if message.Event.Data.NewState.State == message.Event.Data.OldState.State { if message.Event.Data.NewState.State == message.Event.Data.OldState.State {
logger.Debug("State unchanged, publishing to attributes topic") logger.Debug("State unchanged, publishing to attributes topic")
nats.Publish(fmt.Sprintf("homeassistant.attributues.%s.%s", message.Event.Data.EntityId, cleanedState), data) nats.Publish(fmt.Sprintf("homeassistant.attributes.%s.%s", message.Event.Data.EntityId, cleanedState), data)
} else { } else {
nats.PublishRequest(fmt.Sprintf("homeassistant.states.%s.%s", message.Event.Data.EntityId, cleanedState), data, defaultTimeout, 2) nats.PublishRequest(fmt.Sprintf("homeassistant.states.%s.%s", message.Event.Data.EntityId, cleanedState), data, defaultTimeout, 2)
} }