Skip to content

Commit

Permalink
Add services type of "other".
Browse files Browse the repository at this point in the history
Also bump the version since the functionality has changed.
  • Loading branch information
bscheetz committed Jan 7, 2025
1 parent 5e8cc36 commit dc3c4db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions noonlight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
NOONLIGHT_SERVICES_POLICE = "police"
NOONLIGHT_SERVICES_FIRE = "fire"
NOONLIGHT_SERVICES_MEDICAL = "medical"
NOONLIGHT_SERVICES_OTHER = "other"

NOONLIGHT_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"

Expand Down Expand Up @@ -67,6 +68,11 @@ def is_medical(self):
"""Returns True if medical services are included in this alarm"""
return NOONLIGHT_SERVICES_MEDICAL in self.services

@property
def is_other(self):
"""Returns True if other services are included in this alarm"""
return NOONLIGHT_SERVICES_OTHER in self.services

@property
def created_at(self):
"""Returns the datetime the NoonlightAlarm was created"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="noonlight",
version="0.1.1",
version="0.1.2",
packages=["noonlight"],
url="https://github.com/konnected-io/noonlight-py",
license="MIT License",
Expand Down

0 comments on commit dc3c4db

Please sign in to comment.