Skip to content

HomeAssistant integration

Rocky edited this page Nov 25, 2023 · 17 revisions

The integration of Daly2MQTT in HomeAssistant has changed fundamentally. SoftWareCrash and Jarnsen did a Discover together. This means that no entries are required in the configuration.yaml to create the sensors. Requirements:

  1. MQTT broker installed in HomeAssistant

https://youtu.be/44vWgvT_wQc

  1. Daly2MQTT must be installed and MQTT must be configured. image image

  2. There must be data in the WebUI.

image Integration in HomeAssistant:

  1. Check whether data is available in the WebUI!!

image

  1. Go to Settings

image

  1. Go to Configure and click HA Discovery on

image

  1. Click Save settings, the ESP will do a reboot image

image Display in HomeAssistant

  1. As a device in MQTT list

4

  1. The device itself

image image image

  1. In the dashboard

image image image If there no data in the dashboard, reboot Home Assistant!!! Daly does not provide charged and discharged energy sensors. But we can do this ourselves very quickly.

  1. Go to the configuration.yaml and create the following template sensors. Adapt it to your circumstances. The sensor you are accessing is Pack_Power. From this you create charged and discharged in W

template: sensor: DISCHARGE

  • name: "energypack_pack_power_export" unique_id: energypack_pack_power_export unit_of_measurement: 'W' device_class: power state: >- {% if (states('sensor.energypack_pack_power'))|float(0) < 0 %} {{ (states('sensor.energypack_pack_power'))|float(0) * -1 }} {% else %} {{ 0 }} {% endif %} availability: "{{ [ states('sensor.energypack_pack_power') ] | map('is_number') | min }}"

CHARGE

  • name: "energypack_pack_power_import" unique_id: energypack_pack_power_import unit_of_measurement: 'W' device_class: power state: >- {% if (states('sensor.energypack_pack_power'))|float(0) > 0 %} {{ states('sensor.energypack_pack_power')|float(0) }} {% else %} {{ 0 }} {% endif %} availability: "{{ [ states('sensor.energypack_pack_power') ] | map('is_number') | min }}"
  1. Go to settings, devices, helper and create one for charge and one for discharge image

The sensors created by the helpers are only created when power has flowed in the respective direction. Once both are created you can add them to the energy dashboard as a battery

thanks to @Jarnsen for the work!!!

Clone this wiki locally