Home-Assistant-custom-components-Saver
Home-Assistant-custom-components-Saver copied to clipboard
How to save/delete/restore all the entites in one call-service command?
Hi @PiotrMachowski ,
I usually use following:
service: saver.save_state
data:
entity_id: specific_domain.specific_entity
However, I need to list all the entities I want to save, in a separate line. But what if I need to save all the entities when leaving home and then restore them when coming back home? So, I'm wondering if there is any chance to save all the entities at once?
I would expect the following useful ideas to be implemented:
- Save all the available entities:
service: saver.save_state
data:
entity_id: [all]
- Save all the entities from the same domain:
service: saver.save_state
data:
entity_id: specific_domain.all
- Save all the entities except those being excluded:
service: saver.save_state
data:
entity_id: switch.all
excluded_entities:
- switch.kitchen_coffeemaker
- switch.any_other_example
The same approach would be applicable to other services: delete, restore, etc.
I think scene.create would be much better for your use case https://www.home-assistant.io/integrations/scene/#creating-scenes-on-the-fly