Hi!
I have a test installation where i use node-red for reading values from modbus and then resend to MQTT broker. HA has sensor mqtt inputs for those values wich are then showed on ui.
configuration.yaml
- name: "Housesettemp"
state_topic: "modbus/GWheatpump/501"
unit_of_measurement: "°C"
value_template: "{{ value_json.housesettemp }}"
The question is how to make a value a variable that can be adjusted from a view. The problem is that this value can be changed elsewhere, such as the heat pump itself, and in that case the change should not trigger automation from the change but update only value for view.
alias: GW_targettemp
description: GW targettemp
trigger:
- platform: state
entity_id:
- sensor.Housesettemp
condition: []
action:
- service: mqtt.publish
data:
topic: modbus/gw/control/targettemp
payload: "{{ states.sensor.Housesettemp.state }}"
mode: single