Use struct, idomatic go way to write homeassistant component and make it 100 test covered
All checks were successful
Run short tests / run-tests (push) Successful in 1m2s
Run short tests / run-tests (pull_request) Successful in 1m2s

This commit is contained in:
2025-05-19 22:20:05 +02:00
parent 0a76c5feca
commit ccb70e3165
4 changed files with 121 additions and 12 deletions

View File

@@ -122,7 +122,7 @@ func (ha *HomeAssistant) handleGetLatestPoo() bool {
}
func (ha *HomeAssistant) createActionTask(message haMessage) bool {
if !viper.InConfig("homeassistant.actionTaskProjectId") {
if !viper.IsSet("homeassistant.actionTaskProjectId") {
slog.Warn("homeassistant.createActionTask: actionTaskProjectId not found in config file")
return false
}