Hello together,
I’ve been dealing with 2 problems for a while now which are the most important main functions for me. I really need to get that to work now,to turn off my old SmartHome System.
I can produce from my Wago Industrial PLC MQTT Topics.
For example when the brightness value of the Kitchen changes, i send the value per Topic “modbus/LightActualLevel/state/Kueche” to HA. It works, i can see it in HA.
When i send per HA (the MQTT config page, listen/send package) i can see it in Wago too.
I tried it for example with this value template:
- light:
name: "Kueche"
unique_id: "Kueche"
state_topic: "modbus/LightActualLevel/state/Kueche"
command_topic: "modbus/dimmValue/set/Kueche"
payload_off: "0"
payload_on: "100"
brightness_state_topic: "modbus/LightActualLevel/state/Kueche"
brightness_command_topic: "modbus/dimmValue/set/Kueche"
brightness_scale: 100
on_command_type: "brightness"
optimistic: false
state_value_template: "{{ '100' if value == 100.0 else '0' }}"
and others like
"{{ 'True' if value == '100.0' else 'False' }}"
"{{ 'On' if value == '100.0' else 'Off' }}"
And i dont get it… I don’t even can explain all the weird stuff that happens when i try it like this.
Sure i get a entity like:
supported_color_modes:
- brightness
color_mode: null
brightness: null
friendly_name: Kueche
supported_features: 0
But when i move the brightness slider to zero, nothing happens. when i move the slider to 50, he set the value to 50. when i hit the button of the light card, nothing happens, and so on.
When it is neccesary to customize something in my WagoPLC with the Topics, Please tell me! Maybe i need a stop, up, down topic or whatever, i can do!
Please maybe can help me with this. It looks like my knowledge about templates and jinja2 is absolutely useless.
Greetings Patrick.