homeassistant-powercalc: Duplicate Power/Energy sensor for Google Nest Mini

System Health details

System Information

version core-2023.6.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.34
arch x86_64
timezone Europe/Kiev
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4266
Installed Version 1.32.1
Stage running
Available Repositories 1281
Downloaded Repositories 36
AccuWeather
error failed to load: unknown
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.3
update_channel stable
supervisor_version supervisor-2023.06.4
agent_version 1.5.1
docker_version 23.0.6
disk_total 116.7 GB
disk_used 24.1 GB
healthy true
supported true
board generic-x86-64
supervisor_api ok
version_api ok
installed_addons Samba share (10.0.2), Advanced SSH & Web Terminal (15.0.2), Home Assistant Google Drive Backup (0.111.1), HDD Tools (1.1.0), File editor (5.6.0), ESPHome (2023.6.3), VLC (0.2.0), MQTT Explorer (browser-1.0.1), Photoprism (ubuntu)
Dashboards
dashboards 13
resources 20
views 56
mode storage
Recorder
oldest_recorder_run 25 июня 2023 г. в 16:57
current_recorder_run 3 июля 2023 г. в 20:11
estimated_db_size 2929.81 MiB
database_engine mysql
database_version 10.11.2
Sonoff
version 3.5.1 (122751c)
cloud_online 3 / 3
local_online 0 / 0
Xiaomi Miot Auto
component_version 0.7.10
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 34

Checklist

  • I have read the FAQ to see if there is a known solution to my problem.
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues

Describe the issue

I added powercalc intregrated with the configuration:

powercalc:
  enable_autodiscovery: false
  power_sensor_naming: "{} Power"
  create_energy_sensors: true
  energy_sensor_naming: "{} Energy"
  create_utility_meters: false

But it added a Power sensor to my Google speakers, even though auto discovery is off. If I create a configuration for the speakers in powercalc integration, I get two Power sensors, with entity_id one …power the other …power_2. image

Reproduction steps

  1. Add configuration with enable_autodiscovery: false
  2. Restart HA
  3. Sensors appeared in the device,
  4. I add integration with a selection from the library, duplicates appear.

Debug logs

2023-07-03 20:12:15.240 DEBUG (MainThread) [custom_components.powercalc.discovery] media_player.nest_mini_bedroom: Auto discovered model (manufacturer=Google Inc., model=Google Nest Mini)
2023-07-03 20:12:15.242 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=media_player.nest_mini_bedroom entity_category=None, sensor_name=Nest Mini Bedroom Power strategy=linear manufacturer=google model=Nest Mini (H2C) standby_power=1.65 unique_id=pc_a4d83725-ed04-7639-6c0c-820cf9664af0)
2023-07-03 20:12:15.243 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: Nest Mini Bedroom Energy
2023-07-03 20:12:15.245 DEBUG (MainThread) [custom_components.powercalc.discovery] media_player.nest_mini_lounge: Auto discovered model (manufacturer=Google Inc., model=Google Nest Mini)
2023-07-03 20:12:15.245 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=media_player.nest_mini_lounge entity_category=None, sensor_name=Nest Mini Lounge Power strategy=linear manufacturer=google model=Nest Mini (H2C) standby_power=1.65 unique_id=pc_2b26f6f2-d031-a0ef-b3a6-871c04b8593a)
2023-07-03 20:12:15.245 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: Nest Mini Lounge Energy
2023-07-03 20:12:15.248 DEBUG (MainThread) [custom_components.powercalc.discovery] light.lampa_detskaia: Auto discovered model (manufacturer=Yeelight, model=lamp1)
2023-07-03 20:12:15.249 DEBUG (MainThread) [custom_components.powercalc.power_profile.power_profile] Loading sub profile directory default
2023-07-03 20:12:15.250 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.lampa_detskaia entity_category=None, sensor_name=Лампа (Детская) Power strategy=lut manufacturer=yeelight model=MJTD01SYL standby_power=0.64 unique_id=pc_8ac7c0aa35e7ec843e969b49f21e51fe)
2023-07-03 20:12:15.250 DEBUG (MainThread) [custom_components.powercalc.strategy.lut] Loading LUT data file: /config/custom_components/powercalc/power_profile/../data/yeelight/MJTD01SYL/color_temp.csv.gz
2023-07-03 20:12:15.255 DEBUG (MainThread) [custom_components.powercalc.strategy.lut] LUT file loaded: 1872 lines
2023-07-03 20:12:15.255 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: Лампа (Детская) Energy
2023-07-03 20:12:15.256 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.nest_mini_bedroom_power to device 50ebb28b50a7d69e70da4dd771d41283
2023-07-03 20:12:15.257 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.nest_mini_bedroom_energy to device 50ebb28b50a7d69e70da4dd771d41283
2023-07-03 20:12:15.261 DEBUG (MainThread) [custom_components.powercalc.discovery] light.lampa_spalnia: Auto discovered model (manufacturer=Yeelight, model=lamp1)
2023-07-03 20:12:15.261 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.lampa_spalnia entity_category=None, sensor_name=Лампа (Спальня) Power strategy=lut manufacturer=yeelight model=MJTD01SYL standby_power=0.64 unique_id=pc_235c1970072d548a61434d0e27e8b07e)
2023-07-03 20:12:15.261 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: Лампа (Спальня) Energy
2023-07-03 20:12:15.262 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.nest_mini_lounge_power to device 1fd5d9ed33b6288a9b9d3aaeb7493820
2023-07-03 20:12:15.263 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.nest_mini_lounge_energy to device 1fd5d9ed33b6288a9b9d3aaeb7493820
2023-07-03 20:12:15.268 DEBUG (MainThread) [custom_components.powercalc.discovery] light.svetilnik: Auto discovered model (manufacturer=Yeelight, model=ceiling3)
2023-07-03 20:12:15.269 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.svetilnik entity_category=None, sensor_name=Светильник Power strategy=lut manufacturer=yeelight model=YLXD01YL standby_power=0.90 unique_id=pc_daf28209b6131cb50bab81263ae16f24)
2023-07-03 20:12:15.269 DEBUG (MainThread) [custom_components.powercalc.strategy.lut] Loading LUT data file: /config/custom_components/powercalc/power_profile/../data/yeelight/YLXD01YL/default/color_temp.csv.gz
2023-07-03 20:12:15.272 DEBUG (MainThread) [custom_components.powercalc.strategy.lut] LUT file loaded: 1196 lines
...
See in attached ZIP

Diagnostics dump or YAML config

powercalc:
  enable_autodiscovery: false
  power_sensor_naming: "{} Power"
  create_energy_sensors: true
  energy_sensor_naming: "{} Energy"
  create_utility_meters: false
#  utility_meter_types:
#    - daily
#    - weekly
#    - monthly
#    - yearly
#  utility_meter_tariffs:
#    - base

sensor:
#   Power / Energy by Area
  - platform: powercalc
    create_group: Спальня
    include:
      area: Спальня

  - platform: powercalc
    create_group: Детская
    include:
      area: Детская

  - platform: powercalc
    create_group: Зал
    include:
      area: Зал

  - platform: powercalc
    create_group: Кухня
    include:
      area: Кухня

  - platform: powercalc
    create_group: Коридор
    include:
      area: Коридор

  - platform: powercalc
    create_group: Малый коридор
    include:
      area: Малый коридор

  - platform: powercalc
    create_group: Холл
    include:
      area: Холл

  - platform: powercalc
    create_group: Ванна
    include:
      area: Ванна

  - platform: powercalc
    create_group: Туалет
    include:
      area: Туалет

  - platform: powercalc
    create_group: Балкон
    include:
      area: Балкон

  - platform: powercalc
    create_group: Лоджия
    include:
      area: Лоджия

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 32 (16 by maintainers)

Most upvoted comments

Closing this issue

Not when you use include option as told few times before. That will still magically create the sensors. When you don’t want that behaviour just don’t use the include option. When you remove the include and unwanted sensors are still created we can have a further look into that.

I don’t understand the problem or the question you have with media_player.nest_mini_bedroom. Obviously media_player.nest_mini_bedroom is not provided by powercalc integration so that would be False which is correct.