Skip to content

v0.4.0 - Point-in-Polygon Containment Detection

Choose a tag to compare

@troykelly troykelly released this 08 Dec 05:50

What's New in v0.4.0

Point-in-Polygon Containment Detection

This release introduces powerful new containment detection capabilities - know when you're not just near an emergency, but inside the actual warning zone.

New Binary Sensors (Zone/Person modes only)

  • binary_sensor.abc_emergency_*_inside_polygon - Inside any emergency polygon
  • binary_sensor.abc_emergency_*_inside_emergency_warning - Inside Emergency Warning (red) polygon
  • binary_sensor.abc_emergency_*_inside_watch_and_act - Inside Watch and Act (orange+) polygon
  • binary_sensor.abc_emergency_*_inside_advice - Inside Advice (yellow+) polygon

New Events (Zone/Person modes only)

  • abc_emergency_entered_polygon - Fired when entering a polygon
  • abc_emergency_exited_polygon - Fired when exiting a polygon
  • abc_emergency_inside_polygon - Fired each update while inside

New Sensor Attributes

  • contains_point - Whether incident polygon contains your location
  • has_polygon - Whether incident has polygon geometry data
  • containing_count - Number of polygons containing your location
  • inside_polygon - Quick boolean flag for template use
  • highest_containing_level - Highest alert level of containing incidents

Performance Improvements

  • TTL-based cleanup for seen incident storage to prevent unbounded growth
  • Cached Shapely prepared geometries for efficient containment checks

Bug Fixes

  • Added missing containment binary sensor translations
  • Added types-shapely for mypy type checking in CI

Full Changelog: v0.3.0...v0.4.0