That doesn’t sound like a general case, but more like an automation you could create?
An unavailable sensor is still an existing sensor…?
That doesn’t sound like a general case, but more like an automation you could create?
An unavailable sensor is still an existing sensor…?
Yes but I’m able to create an automation but that doesn’t prevent spook from issuing the warning
Hi @frenck I have just updated to the latest version of HA 2024.7.0. There was a repair issue with platform system monitor and I accidentally clicked ignore.
Is there a way to bring it back so i can look and try and fix it?
Ignored Repairs can be viewed in Settings > Systems > Repairs by clicking the 3-dot expansion menu at the top right and checking “Show Ignored Repairs”
A couple of questions…
If I click to ignore a repair that is showing entities missing in the overview for two specific entities will that ignore all repairs caused by missing entities even if they aren’t those previous specific entities?
ex.
I have two missing entities from an integration that I don’t always use and use it for testing purposes only. So the vast majority of the time those entities are missing. But I still might need to use them later and when I do I want them to show up in a normally hidden view in the dashboard. When I want to use those entities I re-add the integration and I unhide the view.
Let’s say those entities are sensor.test_1 and sensor.test_2.
If I click on the ignore repair for those missing entities will the repair come back on for other entities that weren’t included in the original repair for those entities?
Or will it ignore all repairs for other later missing entities in the overview as well?
Or if that is the case then is there a way to tell Spook to ignore specific missing entities from generating a repair?
Yeah, I’m sure that’s all clear as mud…
This release prepares for the upcoming Home Assistant 2024.8 release
While it is not required to upgrade (2024.8 isn’t breaking Spook, and Spook not breaking 2024.8), it does take into account changes made in Home Assistant 2024.8. That release will rename “Services” to “Actions”, which Spook has done now as well
Furthermore, we have a brand new action available this release: homeassistant.list_orphaned_database_entities
, contributed by @gieljnssns.
Oh! And @piitaya dropped by to add support for finding unknown entities in the new (experimental) sections dashboards! Nice
The list_orphaned_database_entities
service is great.
What would make it better would be a way to display the reponse_variable
on a dashboard.
Then it would be simple to create a dashboard/script that takes an input_text
value and purges based on that pattern.
Is that possible now?
I have 1288 orphaned entities and over 1000 of those are geo_location.lightning_strike_nnnn
It would be nice to get rid of those in one go before checking if the rest can be removed
You can try this script
alias: Delete orphaned lightning_strike entities
sequence:
- action: homeassistant.list_orphaned_database_entities
response_variable: orphaned
- action: recorder.purge_entities
target:
entity_id: |
{%- set new_list = namespace(all=[]) %}
{%- for i in orphaned.entities %}
{% if i | contains("lightning_strike") %}
{%- set new_list.all = new_list.all + [ i ] %}
{%- endif %}
{%- endfor %}
{{ new_list.all }}
data:
keep_days: 0
mode: single
Thanks!
I was hoping to find a way to show response_variable
on a dashboard and have an input_text
to provide the contains
parameter.
Now I think about it again… I could probably get it into a sensor. I believe actions are now part of template sensors?
(So much changes - and improves- with HA that if you go away for a few months or more it is hard to keep up!!)
EDIT:
Looks like this is the way to go…
Yes it is! Thanks to Giel for the push…
If anyone is interested this is what I have (I’ve had a cleanup!):
#================
#=== Input Texts
#================
input_text:
system_orphan_search_string:
name: Orphan Search String
#=====================
#=== Template Sensors
#=====================
template:
- trigger:
- platform: time_pattern
hours: /1
- platform: state
entity_id: script.system_delete_orphaned_entities
from: 'on'
to: 'off'
for:
seconds: 2
action:
- service: homeassistant.list_orphaned_database_entities
response_variable: orphaned
sensor:
- name: System List Orphaned Database Entities
unique_id: system_list_orphaned_database_entities
state: >
{{ orphaned.count }}
attributes:
orphans: >
{{ orphaned.entities }}
#============
#=== Scripts
#============
script:
system_delete_orphaned_entities:
alias: System Delete Orphaned Entities
mode: single
sequence:
- service: recorder.purge_entities
data:
entity_id: >
{% set ns_new_list = namespace(to_delete=[]) %}
{% for orphan in state_attr('sensor.system_list_orphaned_database_entities', 'orphans') %}
{% if orphan | contains(states('input_text.system_orphan_search_string')) %}
{% set ns_new_list.to_delete = ns_new_list.to_delete + [ orphan ] %}
{% endif %}
{% endfor %}
{{ ns_new_list.to_delete }}
keep_days: 0
DASHBOARD
- type: entities
entities:
- entity: sensor.system_list_orphaned_database_entities
name: Number of orphaned entities
- type: custom:fold-entity-row
head:
entity: input_text.system_orphan_search_string
tap_action:
action: fire-dom-event
fold_row: true
padding: 0
entities:
- type: custom:hui-element
card_type: markdown
content: >
### ⚠️<font color=DarkOrange>Entities Selected For Removal</font>⚠️ ###
{% set new_list = namespace(to_delete=[]) %}
{%- for orphan in state_attr('sensor.system_list_orphaned_database_entities', 'orphans') %}
{%- if orphan | contains(states('input_text.system_orphan_search_string')) %}
{%- set new_list.to_delete = new_list.to_delete + [ orphan ] -%}
{% endif -%}
{% endfor -%}
{{ new_list.to_delete | list | sort | join(', \n')}}
- entity: script.system_delete_orphaned_entities
name: Delete Selected Entities
icon: mdi:delete
- type: markdown
content: >
### <font color=SteelBlue>All Orphaned Entities</font> ###
{{ state_attr('sensor.system_list_orphaned_database_entities', 'orphans') | list | sort | join(', \n') }}
Is there a way to ignore deactivated automations and only notice them again when they are activated?