legrego / homeassistant-elasticsearch

Publish Home-Assistant events to Elasticsearch
https://legrego.github.io/homeassistant-elasticsearch/
MIT License
143 stars 38 forks source link

[2.0] Add Floors, Labels, and additional device properties #290

Open strawgate opened 3 weeks ago

strawgate commented 3 weeks ago

Add floors support for devices Add labels support for devices and entities Add unit_of_measure for entities Add class for devices (device_class, ex. timestamp) and entities (state_class)

Switch dynamic mode from strict to false to ignore extra fields present in the documents instead of failing to index

Bumps Python to 3.12 and minimum HA version to 2024.4.4

Ready to go on everything except updating doc_creator and doc_publisher tests as I want to wait until https://github.com/legrego/homeassistant-elasticsearch/pull/272 merges before updating those tests

strawgate commented 3 weeks ago

Fixes https://github.com/legrego/homeassistant-elasticsearch/issues/249

strawgate commented 2 weeks ago

consider also adding state_class

strawgate commented 2 weeks ago

https://github.com/legrego/homeassistant-elasticsearch/issues/299

github-actions[bot] commented 2 weeks ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
elasticsearch
   __init__.py1121983%96, 99–101, 104, 110, 119, 137–138, 145–147, 153–154, 174–175, 181, 183, 269
   config_flow.py1991691%163, 196, 326, 390–391, 402–404, 418–419, 423, 501, 576, 585, 619–620
   const.py340100% 
   entity_details.py590100% 
   errors.py28389%51, 60, 67
   es_doc_creator.py191199%342
   es_doc_publisher.py2683885%142–143, 182, 185, 188, 193, 210–211, 229–232, 236, 251–252, 268–269, 273, 298, 302, 396, 416, 458, 472, 483, 486, 514–515, 517–518, 520–521, 525–527, 546, 548, 554
   es_gateway.py1442086%94–95, 114, 133–135, 137, 139–140, 142–143, 146–148, 153–154, 158–160, 253
   es_index_manager.py1491887%77, 82, 182–183, 255–256, 273–274, 279–280, 309–310, 315, 323–324, 337, 350–351
   es_integration.py35877%40, 45–46, 57–61
   es_privilege_check.py610100% 
   es_serializer.py10190%17
   es_version.py300100% 
   logger.py20100% 
   system_info.py25196%37
   utils.py40100% 
TOTAL135112590% 

Tests Skipped Failures Errors Time
221 0 :zzz: 0 :x: 0 :fire: 12.796s :stopwatch:
strawgate commented 2 weeks ago

@legrego good to go!

strawgate commented 1 day ago

@legrego 3 open discussions but incorporated the rest of the feedback