Energy sensor not created with a different name specified
See original GitHub issueNote sure if this is related to https://github.com/bramstroker/homeassistant-powercalc/issues/108 I am currently using 0.5.3 and this is the situation. I have a device tracker that I want to use. I am using another tracker without issue but this one had a problem from the start:
- platform: powercalc
entity_id: device_tracker.00_25_22_19_d1_54
name: nas_power
fixed:
power: 63
The initial probelm I think was a core HA problem because the power and energy sensor were created but I was getting a template error when I tried to use it in the following:
- name: "All device power"
unit_of_measurement: W
icon: mdi:transmission-tower
state: >
{{ states.sensor.aircon_power_usage.state | float
+ states.sensor.tasmota_energy_power.state | float
+ states.sensor.tank_pumo_current_consumption.state | float
+ states.sensor.mainpclan_power.state | float
+ states.sensor.gpo2_power.state | float
+ states.sensor.00_25_22_19_d1_54_power.state | float
}}
So I added that name nas_power
and the template is happy now but I noticed that the energy sensor is still sensor.00_25_22_19_d1_54_energy
. I say still but I can’t be sure it was created in the first place but have no reason to suspect it wasn’t. In any case should the energy sensor be named like that or should it be using the new name. Also while I am talking about it I also found the name:
option didn’t work as I expected. I thought it would take my name and suffix with _power
and _energy
but obviously I discovered I had to call it nas_power
.
Thoughts?
Edit: Actually @bramski80 maybe your explanation here is what happened: https://community.home-assistant.io/t/powercalc-virtual-power-sensors/318515/108?u=ozgav
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Will checkin a few bours
Yes seems good. This is my yaml:
and I now have these entities:
sensor.xigmanas_power
andsensor.xigmanas_energy
So YES that now works as I would have expected. Cheers!