Files
fresh-home/lovelace/details/view-watchman.yaml
T
2024-04-14 14:08:56 -04:00

40 lines
1.5 KiB
YAML

title: Watchman
path: watchman
icon: mdi:sunglasses
visible:
- user: 24a4bd075e7f41a497dd0390a1dd4a9f
cards:
- type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: back
- type: button
entity: sensor.watchman_last_updated
name: Update
show_name: true
show_icon: true
tap_action:
action: call-service
service: watchman.report
service_data:
parse_config: true
target: {}
- type: markdown
content: >-
<h2> <ha-icon icon='mdi:shield-half-full'></ha-icon> Watchman Report<h2>
<h3>Missing Entities: {{ states.sensor.watchman_missing_entities.state }}</h3>
{%- for item in state_attr("sensor.watchman_missing_entities","entities") %}
<hr> <table><tr> <td> <ha-icon icon='mdi: {%- if item.state=="missing"-%}cloud-alert' {%- elif item.state=="unavail"
-%}cloud-off-outline' {%- else-%}cloud-question' {%- endif -%} ></ha-icon> {{
item.id }} [{{item.state}}] <a title="{{item.occurrences}}">
{{item.occurrences.split('/')[-1].split(':')[0]}}</a> </td></tr></table>
{%- endfor %}
<h3> Missing Services: {{ states.sensor.watchman_missing_services.state }}</h3>
{%- for item in state_attr("sensor.watchman_missing_services", "entities") %}
<hr><table><tr><td><ha-icon icon='mdi:cloud-alert'></ha-icon> {{ item.id }} <a
title="{{item.occurrences}}">{{item.occurrences.split('/')[-1].split(':')[0]}}
</a></td></tr></table>
{%- endfor %}