sophienyaa / NodeRenogy

Utility to retrieve data from Renogy solar controllers and publish it to MQTT, written in NodeJS
MIT License
60 stars 13 forks source link

Home Assistant changed MQTT syntax #10

Closed duganj closed 1 year ago

duganj commented 1 year ago

Thanks so much for your work, I was able to implement on my Wanderer 10A unit and connect to HA in an afternoon. The way the MQTT sensors are added to the configuration.yaml file seems to have changed slightly since the example in your readme. Here's what I ended up using that seemed to work:

mqtt:
  sensor:
  - name: "Renogy Battery Capacity"
    state_topic: "NodeRenogy/state"
    value_template: "{{ value_json['battCap'] }}"
    unit_of_measurement: "%"
    device_class: battery
  - name: "Renogy Battery Voltage"
    state_topic: "NodeRenogy/state"
    value_template: "{{ value_json['battV'] }}"
    unit_of_measurement: "V"
    device_class: voltage
  - name: "Renogy Battery Current"
    state_topic: "NodeRenogy/state"
    value_template: "{{ value_json['battC'] }}"
    unit_of_measurement: "A"
    device_class: current
  - name: "Renogy Temperature"
    state_topic: "NodeRenogy/state"
    value_template: "{{ value_json['controlT'] }}"
    unit_of_measurement: "°C"
    device_class: temperature
sophienyaa commented 1 year ago

Hi @duganj, appreciate this! I will update the readme.