diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..c2e499d --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,12 @@ +version: '3' + +tasks: + tag: + cmds: + - git tag {{.VERSION}} + - git push origin {{.VERSION}} + requires: + vars: [VERSION] + tags: + cmds: + - git --no-pager tag --list diff --git a/pkg/nats/subscribers.go b/pkg/nats/subscribers.go index fe24195..9c9c9c8 100644 --- a/pkg/nats/subscribers.go +++ b/pkg/nats/subscribers.go @@ -11,6 +11,7 @@ import ( type TopicType string const StateTopicType TopicType = "states" +const AttributeTopicType TopicType = "attributes" const TimerTopicType TopicType = "timers" const ScheduleTopicType TopicType = "schedules" const CommandTopicType TopicType = "command" @@ -23,6 +24,8 @@ func (t TopicType) GetTopic(id string) string { switch t { case StateTopicType: return fmt.Sprintf("homeassistant.%s.%s.>", t, id) + case AttributeTopicType: + return fmt.Sprintf("homeassistant.%s.%s.>", t, id) case TimerTopicType: return fmt.Sprintf("homeassistant.%s.%s.finished", t, id) case ScheduleTopicType, CommandTopicType: