parent
034b4dcc93
commit
690a0718a8
|
@ -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
|
|
@ -11,6 +11,7 @@ import (
|
||||||
type TopicType string
|
type TopicType string
|
||||||
|
|
||||||
const StateTopicType TopicType = "states"
|
const StateTopicType TopicType = "states"
|
||||||
|
const AttributeTopicType TopicType = "attributes"
|
||||||
const TimerTopicType TopicType = "timers"
|
const TimerTopicType TopicType = "timers"
|
||||||
const ScheduleTopicType TopicType = "schedules"
|
const ScheduleTopicType TopicType = "schedules"
|
||||||
const CommandTopicType TopicType = "command"
|
const CommandTopicType TopicType = "command"
|
||||||
|
@ -23,6 +24,8 @@ func (t TopicType) GetTopic(id string) string {
|
||||||
switch t {
|
switch t {
|
||||||
case StateTopicType:
|
case StateTopicType:
|
||||||
return fmt.Sprintf("homeassistant.%s.%s.>", t, id)
|
return fmt.Sprintf("homeassistant.%s.%s.>", t, id)
|
||||||
|
case AttributeTopicType:
|
||||||
|
return fmt.Sprintf("homeassistant.%s.%s.>", t, id)
|
||||||
case TimerTopicType:
|
case TimerTopicType:
|
||||||
return fmt.Sprintf("homeassistant.%s.%s.finished", t, id)
|
return fmt.Sprintf("homeassistant.%s.%s.finished", t, id)
|
||||||
case ScheduleTopicType, CommandTopicType:
|
case ScheduleTopicType, CommandTopicType:
|
||||||
|
|
Loading…
Reference in New Issue