question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Energy sensor not created with a different name specified

See original GitHub issue

Note 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:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
OzGavcommented, Sep 2, 2021

Will checkin a few bours

0reactions
OzGavcommented, Sep 2, 2021

Yes seems good. This is my yaml:

  - platform: powercalc
    entity_id: device_tracker.00_25_22_19_d1_54
    name: xigmanas    
    fixed:
      power: 63

and I now have these entities: sensor.xigmanas_power and sensor.xigmanas_energy So YES that now works as I would have expected. Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Energy sensors not listed to be added to Energy dashboard
The problem I created some new mqtt sensors I want to use on my Energy dashboard. I defined them like this: sensor: -...
Read more >
Energy: Not showing the expected entities for consumption
I read my smart P1 energy meter with a Raspberry Pi (using https://github.com/freekvh/dsmr-mqtt-wrapper) and send the data to HA using MQTT.
Read more >
RF Safety FAQ | Federal Communications Commission
Frequently asked questions about the safety of radiofrequency (RF) and microwave emissions from transmitters and facilities regulated by the FCC.
Read more >
Delegate access across AWS accounts using IAM roles
This tutorial teaches you how to use a role to delegate access to resources in different AWS accounts that you own called Production...
Read more >
Import and export Excel files - Title Syntax
If there is no worksheet named sheetname in the workbook, a new sheet named sheetname is created. If this option is not specified,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found