As I have quite a few entities from e.g. NodOn smart plugs that report a lot of data I am not interested in, I want to exclude these from the logbook and history. To tidy things up, I tried to do an !include of these entities in my config as follows:
However, I get the following error in the home-assistant.log:
2019-03-06 11:23:59 ERROR (MainThread) [homeassistant.config] Invalid config for [logbook]: value should be a string for dictionary value @ data['logbook']['exclude']['entities']. Got [['sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_level', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_level_2', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_level_3', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_level_4', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_type', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_type_2', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_type_3', 'sensor.nodon_msp_3_1_xx_micro_smart_plug_alarm_type_4', 'sensor.nodon_msp_3_1_xx_micro_smart_pl.... (See ?, line ?). Please check the docs at https://home-assistant.io/components/logbook/
2019-03-06 11:23:59 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Invalid config.
Is it just an indentation issue, or is this type of !include not possible in HA?
Oh, but I did. This is an !include in another !include. I figure that most of the entities I don’t want in my logbook, I don’t want in the database or recorder either. With one !include for the entities, I don’t need to repeat a huge number of code lines.
Gotcha. Just an FYI - If you excluded them in your recorder they automatically won’t show up in your history or logbook because they aren’t in the database at all. Info near the bottom of this page.
Thank you for this. I’ve been using HA for years and initially set up the logbook to have excluded domains and entities, and left it like that with the (incorrect) idea that it drops events from the DB.
Now I know it just hides it instead of dropping and I moved my configuration to recorder: to actually get the drop.
Sorry for the necromancy (the topic is 5 years old) but I wanted to highlight my gratefulness for the information.
I’m a bit confused. I did exactly as you have done in your example, yet I am still getting flooded with camera log entries in logger. I have restarted.