- EDIT: This is a how-to but there’s also a question about getting the correct state for the cover.
I’ve been mostly successful in that I now have a Garage Door opener in Alexa that prompts for voice code and actually does open, close or stop the garage door as opposed to saying “Garage Door doesn’t support that.”. The trick to getting it to work is not only device_class: garage
but also device type cover
.
cover:
- platform: mqtt
name: "Garage Door Opener"
unique_id: mqtt-garage-door-opener
device_class: 'garage'
device:
identifiers: "z-wave"
manufacturer: "FotrezZ"
model: "MIMOlite"
name: "MIMOlite"
sw_version: "1.17"
via_device: "OpenZWave"
command_topic: "OpenZWave/1/command/setvalue/"
state_topic: "OpenZWave/1/node/11/instance/1/commandclass/48/value/189530128"
state_open: "open"
state_closed: "closed"
payload_open: '{ "ValueIDKey": 155795472, "Value": true }'
payload_close: '{ "ValueIDKey": 155795472, "Value": true }'
payload_stop: '{ "ValueIDKey": 155795472, "Value": true }'
value_template: "{{ value_json.Value }}"
optimistic: false
retain: true
I appear though to be missing the correct state
of this new garage door opener in my new ‘cover’. I am attempting to reference the state
of the ozw tilt sensor which is true|false but the state of the cover in HA remains unknown
…
Mimolite Node 9
OpenZWave/1/node/9/instance/1/commandclass/37/value/155795472/
{
"Label": "Switch",
"Value": false,
"Units": "",
"ValueSet": true,
"ValuePolled": false,
"ChangeVerified": false,
"Min": 0,
"Max": 0,
"Type": "Bool",
"Instance": 1,
"CommandClass": "COMMAND_CLASS_SWITCH_BINARY",
"Index": 0,
"Node": 9,
"Genre": "User",
"Help": "Turn On/Off Device",
"ValueIDKey": 155795472,
"ReadOnly": false,
"WriteOnly": false,
"Event": "valueChanged",
"TimeStamp": 1609904761
}
Ecolink Tilt Sessor Node 11
OpenZWave/1/node/11/instance/1/commandclass/48/value/189530128/
{
"Label": "Sensor",
"Value": false,
"Units": "",
"ValueSet": true,
"ValuePolled": false,
"ChangeVerified": false,
"Min": 0,
"Max": 0,
"Type": "Bool",
"Instance": 1,
"CommandClass": "COMMAND_CLASS_SENSOR_BINARY",
"Index": 0,
"Node": 11,
"Genre": "User",
"Help": "Binary Sensor State",
"ValueIDKey": 189530128,
"ReadOnly": true,
"WriteOnly": false,
"Event": "valueChanged",
"TimeStamp": 1609904770
}
Any ideas how to get the state
set to Open or Closed?