What would you automate though?
@tom_l probably not a lot but I would send out a notification under certain conditions, e.g. in the evening only when I am home and alone.
Current version of integration supports both use cases.
@scr absolutely, and that is great! With adding entity_id
s of all problematic entities to the generated entites being on the roadmap, there is really not much I would wish for
Regarding a Lovelace card, I would suggest to generate a markdown card from the discussed entity. That should be just a few lines of code you can provide through your README.
Just to be clear. Your addon already helped me a lot!! It is so valuable for users that I thought I can add some constructive criticism To be honest, I believe this should find itās way into Home Assistant, in fact you should know that someone is working on a Visual Studio Code extension.
Best!
scr
February 11, 2022, 8:20pm
23
This sounds like a good idea, however, I should check if there is a limit for the maximum amount of data for an entity state. The report can be quite long sometimes.
Any feedback is really appreciated, thank you!.
finity
February 11, 2022, 8:50pm
24
All states are limited to no more than 255 characters.
Attributes are unlimited. As far I know. At least I havenāt found that limit yet.
And to add my support for this integration. It really is a great tool. Ive found a bunch of stuff I needed to take care of as well.
1 Like
scr
February 11, 2022, 9:17pm
25
This bug was fixed in v.0.3.1.
2 Likes
scr
February 11, 2022, 9:19pm
26
Great, thanks for the info!
Bunyip183
(Stuart)
February 12, 2022, 6:18am
27
I get the following error when I add Watchman to my configuration.yaml
:
Component error: watchman - cannot import name āSensorDeviceClassā from āhomeassistant.components.sensorā (/usr/src/homeassistant/homeassistant/components/sensor/init .py)
Iām running version 0.3.1 on 2021.11.5
Any ideas on how to resolve this?
scr
February 12, 2022, 7:29am
28
There were unused dependencies on HA version 2021.12, theyāre removed in v.0.3.2, please update.
1 Like
Bunyip183
(Stuart)
February 12, 2022, 7:36am
29
@scr Thanks! Itās working now.
Great work!
Just quick a tip, when posting the report here on the forum, you can use
```text
report_here
```
to avoid having the colorful syntax highlighting thatās really meant for diff
.
Without `text`
-== WATCHMAN REPORT ==-
-== Missing 1 service(-s) from 38 found in your config:
+--------------------------------+---------+------------------------------------------+
| Service | State | Location |
+--------------------------------+---------+------------------------------------------+
| xiaomi_miio.vacuum_goto | missing | automations.yaml:599,605 |
+--------------------------------+---------+------------------------------------------+
-== Missing 3 entity(-es) from 216 found in your config:
+--------------------------------+---------+------------------------------------------+
| Entity | State | Location |
+--------------------------------+---------+------------------------------------------+
| sensor.stats_pm25_10_median | unavail | customize.yaml:14 |
| sensor.xiaomi_miio_sensor | unavail | automations.yaml:231,1348 |
| vacuum.roborock_s5max | unavail | automations.yaml:589,603,610,1569 |
+--------------------------------+---------+------------------------------------------+
-== Report created on 03 Feb 2022 17:18:55
-== Parsed 200 files in 0.96s., ignored 66 files
-== Generated in: 0.01s. Validated in: 0.00s.
With `text`
-== WATCHMAN REPORT ==-
-== Missing 1 service(-s) from 38 found in your config:
+--------------------------------+---------+------------------------------------------+
| Service | State | Location |
+--------------------------------+---------+------------------------------------------+
| xiaomi_miio.vacuum_goto | missing | automations.yaml:599,605 |
+--------------------------------+---------+------------------------------------------+
-== Missing 3 entity(-es) from 216 found in your config:
+--------------------------------+---------+------------------------------------------+
| Entity | State | Location |
+--------------------------------+---------+------------------------------------------+
| sensor.stats_pm25_10_median | unavail | customize.yaml:14 |
| sensor.xiaomi_miio_sensor | unavail | automations.yaml:231,1348 |
| vacuum.roborock_s5max | unavail | automations.yaml:589,603,610,1569 |
+--------------------------------+---------+------------------------------------------+
-== Report created on 03 Feb 2022 17:18:55
-== Parsed 200 files in 0.96s., ignored 66 files
-== Generated in: 0.01s. Validated in: 0.00s.
2 Likes
pdwonline
(When a goat is on the net)
February 21, 2022, 1:25pm
32
This is great ! However, it would have been su much nicer if markdown was used. It would be simple:
replace + sign in tables to |
remove the top and bottom line of the table
replace the -== marker for the headings into ##
That would look like (for example)
# Watchman Report
## Missing 1 service(s) from 35 found in your config:
| Service ID | State | Location |
|--------------------------------|---------|--------------------------------------------------------------|
| homeassistant.turn_ | missing | blueprints/automation/adchevrier/synchronize-the-on-off- state-of-2-entities.yaml:29 |
## Missing 7 entity(ies) from 249 found in your config:
| Entity ID | State | Location |
--------------------------------|---------|--------------------------------------------------------------|
| group.movement_inside | unknown | groups.yaml:105 |
| binary_sensor.pir_motion_sensor_home_security_motion_detection_2 | missing | groups.yaml:106 |
| binary_sensor.pir_motion_sensor_home_security_motion_detection | missing | groups.yaml:107 |
| automation.deurnotificatie | missing | customize.yaml:20 |
| automation.auto_duettes_op | missing | scripts.yaml:142 |
| switch.schedule_abcdef | missing | custom_components/scheduler/services.yaml:8,29,94,154 |
| light.my_lamp | missing | custom_components/scheduler/services.yaml:64,124
and would then be viewed like:
Watchman Report
Missing 1 service(s) from 35 found in your config:
Service ID
State
Location
homeassistant.turn_
missing
blueprints/automation/adchevrier/synchronize-the-on-off- state-of-2-entities.yaml:29
Missing 7 entity(ies) from 249 found in your config:
Entity ID
State
Location
group.movement_inside
unknown
groups.yaml:105
binary_sensor.pir_motion_sensor_home_security_motion_detection_2
missing
groups.yaml:106
binary_sensor.pir_motion_sensor_home_security_motion_detection
missing
groups.yaml:107
automation.deurnotificatie
missing
customize.yaml:20
automation.auto_duettes_op
missing
scripts.yaml:142
switch.schedule_abcdef
missing
custom_components/scheduler/services.yaml:8,29,94,154
light.my_lamp
missing
custom_components/scheduler/services.yaml:64,124
1 Like
Pirol62
(Jƶrg Nauen)
February 21, 2022, 4:32pm
33
Already installed & tested this component.
The result was amazing! Iād have never believed how many bugs I had in my yamlās.
I needed nearly an hour to resolve everything.
Thanks for this component. Really helpful - great job!!
PS: I will automate it once a month. Too good to may forget to use it
1 Like
maurizio53
(Maurizio Fabiani)
February 23, 2022, 5:34pm
34
I am trying to use this markdown card in yaml mode:
- 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 %}
But when i go to developers-> models to test it i get only:
TypeError: 'NoneType' object is not iterable
And in the lovelace.log i get:
2022-02-23 16:59:37 ERROR (Thread-461) [homeassistant.helpers.template] Template variable error: 'item' is undefined when rendering '<h3>Missing Entities: {{ states.sensor.watchman_missing_entities.state }} </h3>
{{ item.id }} [{{item.state}}] <a title="{{item.occurrences}}">
{{item.occurrences.split('/')[-1].split(':')[0]}}</a>
</td></tr></table>'
In lovelace i have no visible card.
As i am not so expert in these things i am asking helpā¦
EDIT: Solved after latest release !
Thanksā¦
stevemann
(Stephen Mann (YAML-challenged))
February 23, 2022, 6:54pm
35
And your solution was ??? Other people following this thread might like to know.
maurizio53
(Maurizio Fabiani)
February 23, 2022, 6:56pm
36
No solution from meā¦ i installed latest version released only few minutes ago and the card is showing!
I just pasted and copied the example posted here
scr
February 23, 2022, 7:49pm
37
The new version was published in ~30 minutes after documentation was updated. I believe @maurizio53 was lucky enough to discover a new feature before it was actually released.
1 Like
stevemann
(Stephen Mann (YAML-challenged))
February 24, 2022, 2:36pm
39
Suggestion: Put the current Watchman version in the report.
How do I determine what version I have installed?
How do I upgrade to the latest version?
If you are using HACS, click the 3 dots and then click Redownload:
1 Like