-
-
Notifications
You must be signed in to change notification settings - Fork 31
HomeAssistant integration
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.
1. MQTT broker installed in HomeAssistant
2. Daly2MQTT must be installed and MQTT must be configured.
3. There must be data in the WebUI.
1. Check whether data is available in the WebUI!!
2. Go to Settings
3. Go to Configure and click HA Discovery on
4. Click Save settings, the ESP will do a reboot
1. As a device in MQTT list
2. The device itself
3. In the dashboard
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:
- name: "energypack_pack_power_export"
unique_id: energypack_pack_power_export
unit_of_measurement: 'W'
device_class: power
state_class: measurement
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
}}"
- name: "energypack_pack_power_import"
unique_id: energypack_pack_power_import
unit_of_measurement: 'W'
device_class: power
state_class: measurement
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
}}"
2. Go to settings, devices, helper and create one for charge and one for discharge
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!!!
If you don't have the willingness to tinker and learn... TURN BACK!
This project is not a commercial product and support is limited. You have to be willing to research and solve potential problems yourself.