Skip to content

More entities; status items now update every 5s

Choose a tag to compare

@Tom-Bom-badil Tom-Bom-badil released this 02 Aug 18:28
· 228 commits to main since this release
d6986a8

What's Changed

For end users

πŸ‘‰ New features
Added many new sensors and a new data update coordinator that pulls most status entities every 5 seconds (items that don't change a lot remain at 60s).

πŸ‘‰ Bug fixes
Bunch of bug fixes, mainly on issues reported in the discussions.

πŸ‘‰ Documentation / Wiki and Lovelace GUI
Added some more pics to /www. Also some small changes to the lovelace page code in 'Entire dashboard page' (Note: No need to do the whole installation again - just replace the page YAML).

For fellow programmers

πŸ‘‰ __init__.py: Major refactoring

  • Now two entity types: configuration and status
  • Introduced a second coordinator for status entities (updates every 5s)
  • Shortened update_data functions by outsourcing major code parts into a separate function collect_entity_values
  • Compacted code for initializing dynamic configuration entities; moved logic out of update functions (previously, the entity list was rebuilt from scratch on every update)
  • Preparations for adding more status entities in future releases

πŸ‘‰ api.py: Add items for new status coordinator

  • Added several new status items, polled every 5s
  • Removed redundant items with identical names or contents that were previously polled every 60s
  • Work in progress – more items to be added
  • Introduced new virtual calculated path, handled inside __init__.py, e.g. path="calculated:ram_total_size" or path="calculated:scale_bytes_per_second:data.volume.series[0].write_rate"

πŸ‘‰ utils.py: Added functions, minor changes

  • Added two new functions: scale_bytes_per_second and extract_value_from_path
  • Minor changes to existing functions to return properly formatted values

πŸ‘‰ button.py and sensor.py

  • Renamed coordinator β†’ configuration_coordinator
  • Added status_coordinator where needed

ToDo

πŸ‘‰ Still more entities to be added, particularly dynamic status items, but also static configuration items. I still have a list of ~170 items that are still not in the code.