Hello,
I’m trying to bind a binary_sensor (following HA discovery syntax) but it doesn’t map the true/false boolean to the OnOffType
Command 'True' from channel 'mqtt:homeassistant:x:y:z_online' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.True
Here is the channel config
- id: z_online
channelTypeUID: mqtt:ha-switch
label: Inverter Online
configuration:
component: binary_sensor
config:
- '{"name": "Inverter Online", "unique_id": "z_online",
"state_topic": "aps/x/y", "value_template": "{{
value_json.online }}", "device": {"identifiers": ["y"],
"name": "APS Inverter y", "manufacturer": "APsystems",
"via_device": "x"}, "availability_topic": "aps/status",
"payload_available": "online", "payload_not_available": "offline",
"payload_on": "true", "payload_off": "false", "icon":
"mdi:power-plug"}'
nodeid: ""
objectid:
- aps_z_online
And the MQTT message
Topic: aps/x/y QoS: 0
{
"online": false
}
I’ve tried to use profile but it looks like the event doesn’t reach this step
Thanks for your help