AST, 12/2019
Automatically create "NotUpdated" rules in Pimatic.
Use the Pimatic API to retrieve the list of devices and attributes and automatically create rules "was not updated" like
Temperatur of wemosd1_og2_treppe was not updated for 24 hours
Creating rules can be tedious. Creating lots of identical rules for "was not updated" can get really exhausting for lots of devices.
This Python program does this job for you.
- Python 3.6+
- Pimatic (tested with v0.9.48)
- An authorized Pimatic user (e.g., admin user)
- Setup requirements
pip3 install -r requirements.txt
- Setup local configuration file, see template
config_local.py.template
. The new name must beconfig_local.py
. - Run
python3 step1_getattrs.py
. This createsstep1_getattrs.txt
. - Edit
step1_getattrs.txt
and activate rule-creation for listed items by uncommenting the lines (remove #). - Run
python3 step2_createrules.py
.