im trying to test some switches without any succes for now. I suspect it is the way these Mqtt switches are defined now.
Im not sure what to use, and consequently, what the correct syntax is.
This is what i have now:
- platform: mqtt
state_topic: "macaddress/powerswitch-zwave/430ba8cf"
name: "Office"
command_topic: "macaddress/powerswitch-zwave/430ba8cf/command"
availability_topic: "macaddress/powerswitch-zwave/430ba8cf/available"
payload_on: "on"
payload_off: "off"
# optimistic: false
# qos: 0
# retain: true
value_template: '{{ value_json.power }}'
Could you please help getting it right for me? Thanks for any help!
Marius
Below is the object declaration of my Zwave hub, Switch Office.
I want to be able to turn this in and off obviously , and lateron use it in automation scenes.
Best to prepare for that from the beginning:
here goes:
{
"driver": "powerswitch-zwave",
"name": "6 - Office",
"oid": "430ba8cf",
"propsval": [
{
"id": "name",
"value": "6 - Office"
},
{
"id": "state",
"value": "on"
},
{
"id": "usage",
"value": 6.4
},
{
"id": "power",
"value": 0.1668
},
{
"id": "classes",
"value": "{0x25 ,0x32 ,0x72 ,0x86 ,0x20 ,0x71 ,0x70 ,0x27 ,0x85 ,0x87 ,0x75 ,0x56 }"
},
{
"id": "hidden",
"value": false
},
{
"id": "enableset",
"value": true
},
{
"id": "available",
"value": true
}
],
"propertyInfo": [
{
"type": "string",
"label": "Name",
"id": "name",
"writable": true,
"persistent": true
},
{
"type": "command",
"fn_set": null,
"label": "Command",
"id": "command",
"writable": true,
"range": "on,off",
"timer": true
},
{
"type": "boolean",
"label": "associate",
"id": "associate",
"writable": true,
"fn_set": null
},
{
"type": "boolean",
"label": "metering",
"id": "associate3",
"writable": true,
"fn_set": null
},
{
"type": "string",
"default": "na",
"label": "state",
"id": "state",
"writable": false
},
{
"min": -4000,
"type": "number",
"label": "Power",
"id": "usage",
"max": 4000,
"log": true,
"unit": "Watt"
},
{
"type": "number",
"label": "usage",
"id": "power",
"log": true,
"cumulative": true,
"unit": "kWh"
},
{
"type": "string",
"label": "Classes",
"id": "classes",
"writable": false,
"persistent": true
},
{
"type": "command",
"label": "meter reset",
"id": "meterreset",
"writable": true,
"range": "reset",
"fn_set": null
},
{
"type": "command",
"label": "meter get",
"id": "meterget",
"writable": true,
"range": "usage,power,state",
"fn_set": null
},
{
"type": "boolean",
"default": false,
"label": "Hidden",
"id": "hidden",
"writable": true,
"persistent": true
},
{
"type": "boolean",
"default": true,
"label": "Enable set",
"id": "enableset",
"writable": true,
"persistent": true,
"fn_set": null
},
{
"type": "boolean",
"label": "Available",
"id": "available",
"writable": true,
"fn_set": null
}