I have created some buttons and a binary sensor to control my camera via MQTT. This works and I am able to rotate the camera or move the camera to the different positions.
However, it does not work to create a switch (Wohnzimmer Kamera Area1) via which I could activate the monitoring of Area 1. I do not get an error message, but the switch does not appear in the entities either.
What am I doing wrong here?
Configuration.yaml
...
knx: !include_dir_merge_named knx/
mqtt: !include_dir_merge_named mqtt/
....
Instar.yaml
binary_sensor:
- name: "Wohnzimmer Kamera Alarm"
state_topic: "instar/instar-wohnzimmer/status/alarm/triggered"
unique_id: 5650ce8b-1444-45e4-87e0-23e1ed62d0b2
payload_on: "ON"
payload_off: "OFF"
device_class: motion
value_template: "{% if value_json.val == '0' %}OFF{% else %}ON{% endif %}"
switch:
- name: "Wohnzimmer Kamera Area1"
unique_id: 30f199b2-a1b6-4d16-9f76-eb05b5e33c8b
state_topic: "instar/instar-wohnzimmer/status/alarm/area1/enable"
command_topic: "instar/instar-wohnzimmer/alarm/area1/enable"
qos: 1
payload_on: '{"val":"1"}'
payload_off: '{"val":"0"}'
state_on: "ON"
state_off: "OFF"
optimistic: false
retain: false
button:
- name: "Wohnzimmer Kamera Position1"
unique_id: 3dbc679c-7751-4d87-84bf-c13d27e80503
command_topic: "instar/instar-wohnzimmer/features/ptz/preset"
qos: 2
payload_press: '{"val":"0"}'
retain: false
- name: "Wohnzimmer Kamera Position2"
unique_id: a2fb22e5-d644-45ee-8a11-01bfc724b068
command_topic: "instar/instar-wohnzimmer/features/ptz/preset"
qos: 2
payload_press: '{"val":"1"}'
retain: false
...