Skip to content

Commit 0f1239d

Browse files
committed
HA-switch support for climate and input_boolean entities
climate and input_boolean entities are now supported in addition to switch entities for the homeassistant-switch charger template. This allows controlling devices like heaters, thermostats and smart plugs as chargers.
1 parent 01f82ba commit 0f1239d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

templates/definition/charger/homeassistant-switch.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ group: switchsockets
55
requirements:
66
evcc: ["skiptest"]
77
description:
8-
en: Home Assistant instances in your network will be auto-discovered and suitable entities (e.g. `switch.*`, `sensor.*`) will be suggested.
9-
de: Home Assistant Instanzen in deinem Netzwerk werden automatisch erkannt und passende Entitäten (z.B. `switch.*`, `sensor.*`) werden vorgeschlagen.
8+
en: Home Assistant instances in your network will be auto-discovered and suitable entities (e.g. `switch.*`, `climate.*`, `input_boolean.*`, `sensor.*`) will be suggested.
9+
de: Home Assistant Instanzen in deinem Netzwerk werden automatisch erkannt und passende Entitäten (z.B. `switch.*`, `climate.*`, `input_boolean.*`, `sensor.*`) werden vorgeschlagen.
1010
auth:
1111
type: homeassistant
1212
params: [uri]
@@ -29,8 +29,8 @@ params:
2929
description:
3030
de: Entity ID des schaltbaren Geräts
3131
en: Entity ID of the switch device
32-
service: homeassistant/entities?uri={uri}&domain=switch
33-
example: switch.smartsocket
32+
service: homeassistant/entities?uri={uri}&domain=switch,climate,input_boolean
33+
example: switch.smartsocket, climate.smartheater, input_boolean.smartplug
3434
required: true
3535
- name: power
3636
description:

util/homeassistant/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (c *Connection) GetBoolState(entity string) (bool, error) {
113113

114114
state = strings.ToLower(state)
115115
switch state {
116-
case "on", "true", "1", "active", "yes":
116+
case "on", "true", "1", "active", "yes", "heat", "cool", "heat_cool":
117117
return true, nil
118118
case "off", "false", "0", "inactive", "no":
119119
return false, nil

0 commit comments

Comments
 (0)