docs: normalize & make basic corrections to documentation

This commit is contained in:
2025-08-01 21:19:47 -05:00
parent e13fd6ab5b
commit 292879a8a9
28 changed files with 132 additions and 229 deletions

View File

@@ -8,6 +8,7 @@ type Switch struct {
conn *connect.HAConnection
}
// TurnOn turns on a switch entity.
func (s Switch) TurnOn(entityId string) error {
req := NewBaseServiceRequest(entityId)
req.Domain = "switch"
@@ -16,6 +17,7 @@ func (s Switch) TurnOn(entityId string) error {
return s.conn.WriteMessage(req)
}
// Toggle toggles a switch entity.
func (s Switch) Toggle(entityId string) error {
req := NewBaseServiceRequest(entityId)
req.Domain = "switch"
@@ -24,6 +26,7 @@ func (s Switch) Toggle(entityId string) error {
return s.conn.WriteMessage(req)
}
// TurnOff turns off a switch entity.
func (s Switch) TurnOff(entityId string) error {
req := NewBaseServiceRequest(entityId)
req.Domain = "switch"