diff --git a/automation/bicycle-charger-notification.yaml b/automation/bicycle-charger-notification.yaml new file mode 100644 index 0000000000000000000000000000000000000000..28bbf38d08b7cbce9c202b698141e42a313c51d8 --- /dev/null +++ b/automation/bicycle-charger-notification.yaml @@ -0,0 +1,78 @@ +blueprint: + name: Bicycle Charger Notification + description: Get notified when the bicycle battery is fully charged + domain: automation + input: + power_switch: + name: Charger Switch + description: The switch turns the charger on/off. + selector: + entity: + domain: switch + power_sensor: + name: Charger Power Sensor + description: The power sensor of your charger. + selector: + entity: + domain: sensor + device_class: power + is_charging: + name: Charging State + description: The toggle helper that stores if the bicycle is charging. + selector: + entity: + domain: input_boolean + notify_device: + name: Device to notify + description: Device needs to run the official Home Assistant app to receive notifications. + selector: + device: + integration: mobile_app + +mode: single + +trigger: + - platform: numeric_state + entity_id: !input power_sensor + for: + hours: 0 + minutes: 0 + seconds: 30 + above: 80 + - platform: numeric_state + entity_id: !input power_sensor + for: + hours: 0 + minutes: 1 + seconds: 0 + below: 3 + +action: + - choose: + - conditions: + - condition: numeric_state + entity_id: !input power_sensor + above: 80 + sequence: + - service: input_boolean.turn_on + target: + entity_id: !input is_charging + - conditions: + - condition: numeric_state + entity_id: !input power_sensor + below: 3 + - condition: state + entity_id: !input is_charging + state: "on" + sequence: + - device_id: !input notify_device + domain: mobile_app + type: notify + title: Bicycle Battery + message: The battery is fully charged! + - service: switch.turn_off + target: + entity_id: !input power_switch + - service: input_boolean.turn_off + target: + entity_id: !input is_charging diff --git a/automation/coffee-brewer-notification.yaml b/automation/coffee-brewer-notification.yaml index 80b3155ab2f0e4626d3e30d8f82a6aaddde39d15..007189551e0a7abe3f29cbab9271452b96b8560c 100644 --- a/automation/coffee-brewer-notification.yaml +++ b/automation/coffee-brewer-notification.yaml @@ -1,5 +1,5 @@ blueprint: - name: Coffee Brewer Notifications + name: Coffee Brewer Notification description: Get notifications when your coffee is ready and when it is getting cold. domain: automation input: