dummylabs / thewatchman

Home Assistant custom integration to keep track of missing entities and actions in your config files
MIT License
475 stars 20 forks source link

Feature Request alexa.yaml include_entities and entity_config #88

Closed TBobsin closed 4 months ago

TBobsin commented 1 year ago

Hello If you have many devices, the optional part below entity_config: is quickly forgotten or overlooked. Therefore, it would be good if the missing optional entry is displayed.

Example:

alexa:
smart_home:
include_entities:
  - light.tv_lamp
  - light.floor_lamp
  - switch.smartplug

entity_config:
  light.tv_lamp:
   name: "tv_lamp
   display_categories: LIGHT
   description: "Lamp next to the TV

   switch.smartplug:
     name: "My Smartplug"
     display_categories: LIGHT

Here the light.floor_lamp is missing under entity_config: - that should definitely be displayed in Watchman.

The entity_config: only makes sense if the other attributes are set. Therefore, please also check whether they are present. The display_categories: is probably SMARTPLUG instead of LIGHT The description is missing for the smartplug.

Homeassistant also does not check whether the include_entities: exist in HA. For example, I had accidentally written "TV lamps" (more number), so Alexa has not recognized the lamp.

Thanks for the good work

dummylabs commented 4 months ago

Hey @TBobsin, thanks for feedback, sorry for late answer ) Disclaimer: I don’t have Alexa, and it’s possible that the integration has already migrated to UI configuration, rendering the reply below obsolete. The current version of Watchman is unable to catch errors in configuration files like this. It simply identifies entities or service definitions from these files and checks if these objects exist in the Home Assistant registry. Additionally, ‘entity_config’ appears to be a convention among integration developers and may have varying semantics from one integration to another. At least I couldn’t find any reference to it in the Home Assistant documentation. In my opinion, validations like this should be handled by the Alexa integration. Feel free to reopen the request if I misunderstood the proposal.