I want to create a Gauge Card to see how much power I currently use.
To get data, I need to calculate the following:
Power production (Solar panels) - Power return to grid (P1 monitor) + Grid use = Current Power use
I’m new in Home assistant, hop somebody can help with it ?
Thank you for your reply, I have added it to configuration.yaml and tray to restart HA but i get error
Failed to restart Home Assistant
The system cannot restart because the configuration is not valid: Invalid config for [sensor.template]: invalid template (TemplateSyntaxError: unexpected char '“' at 11) for dictionary value @ data['sensors']['power_total']['value_template']. Got '{{ (states(“sensor.phases_power_consumed_phase_l1") | float + states("sensor.solaredge_ac_power”) | float - states("sensor.smartmeter_power_production”) | float) | round }}'. (See ?, line ?).
I have added your script in “/config/configuration.yaml” as follows and change Entity’s to mine.
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homeassistant:
auth_mfa_modules:
- type: totp
sensor:
- platform: template
sensors:
power_total:
friendly_name: "Power total"
unit_of_measurement: 'W'
value_template: '{{ (states(“sensor.phases_power_consumed_phase_l1") | float + states("sensor.solaredge_ac_power”) | float - states("sensor.smartmeter_power_production”) | float) | round }}'
Hi there,
my sensor for PV power stops being available after the inverter shuts down when it gets dark. Is there a way to assume zero watts when the PV sensor is not available?
How would I do that?