diff --git a/.changeset/control-not-following-kind.md b/.changeset/control-not-following-kind.md new file mode 100644 index 0000000..8a9f5bf --- /dev/null +++ b/.changeset/control-not-following-kind.md @@ -0,0 +1,8 @@ +--- +"ftw-webapp": patch +--- + +Notifications gain "If a device does not do what FTW asks": the box tells the +owner when a device has not followed FTW for ten minutes, as a battery that +charges while FTW asks it to discharge. The kind joins the push catalogue +shared with Core and the iPhone app. diff --git a/contract/push-catalogue.yaml b/contract/push-catalogue.yaml index 3a56367..e428f57 100644 --- a/contract/push-catalogue.yaml +++ b/contract/push-catalogue.yaml @@ -44,6 +44,13 @@ events: # kettle must not page anyone. title: The house is drawing too much body: "{phase} is over the fuse rating." + - kind: control.not_following + # After the box's own threshold: ten minutes in which the box's answer + # to "Are we in control?" said a device does not do what FTW asked, as + # a battery that charges when told to discharge. A slow battery must not + # page anyone. Once until the device follows again. + title: A device is not following FTW + body: "{name} does not do what FTW asks. Open FTW to see why." - kind: box.unreachable # The one sentence the box cannot send about itself. The relay holds # this pre-encrypted and posts it only when the box has missed its diff --git a/src/lib/notify/kinds.ts b/src/lib/notify/kinds.ts index 3f18afa..599bb7b 100644 --- a/src/lib/notify/kinds.ts +++ b/src/lib/notify/kinds.ts @@ -16,6 +16,7 @@ export const KINDS = [ 'update.installed', 'driver.offline', 'fuse.over_limit', + 'control.not_following', 'box.unreachable', 'cloud.granted', 'cloud.revoked', @@ -49,6 +50,7 @@ export const KIND_LABELS: Record = { 'update.installed': 'When your box updates itself', 'driver.offline': 'If a device goes quiet', 'fuse.over_limit': 'If the house draws more than the fuse allows', + 'control.not_following': 'If a device does not do what FTW asks', 'box.unreachable': 'If your box goes out of reach', 'cloud.granted': 'When FTW Cloud is turned on', 'cloud.revoked': 'When FTW Cloud is turned off',