home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.54k stars 29.47k forks source link

0.115.2 Reloading command_line sensors entities from the UI creates duplicates #40356

Closed domolys closed 3 years ago

domolys commented 3 years ago

The problem

After using reload command_line sensors entities from the UI it creates duplicates on those (examples) sensors (and many others)

sensor.disk_use_wyze_cam_1 & sensor.disk_use_wyze_cam_1 _2 sensor.disk_use_wyze_cam_2 & sensor.disk_use_wyze_cam_2 _2

Restarting Core removes duplicates, no more "_2 duplicates"

Environment

Problem-relevant configuration.yaml


  - platform: command_line
    name: "Disk use /wyze_cam_1"
    command: "du -c /share/cameras/wyze_cam_1*.* | tail -1 | awk '{ print $1 }'"
    value_template: '{{ (float(value) /1024) | round(1) }}'
    scan_interval: 10800
    unit_of_measurement: MiB
  - platform: command_line
    name: "Disk use /wyze_cam_2"
    command: "du -c /share/cameras/wyze_cam_2*.* | tail -1 | awk '{ print $1 }'"
    value_template: '{{ (float(value) /1024) | round(1) }}'
    scan_interval: 10800
    unit_of_measurement: MiB 

Traceback/Error logs

Additional information

probot-home-assistant[bot] commented 3 years ago

command_line documentation command_line source (message by IssueLinks)

gerard33 commented 3 years ago

I notice the same behaviour.

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.