Fixed Automation Off. Also fixed MQTT Clock displays thanks to @matt2005 - Closes #294 & #270.

This commit is contained in:
ccostan 2018-01-04 18:14:41 -05:00
parent 423e1fbaff
commit e59f9072fe
7 changed files with 15 additions and 9 deletions

View File

@ -9,7 +9,7 @@
platform: time platform: time
at: '2:31:00' at: '2:31:00'
action: action:
- service: zwave.heal_network # - service: zwave.heal_network - Not needed anymore since I've migrated to Wink.
- service: script.tweet_engine - service: script.tweet_engine
data_template: data_template:

View File

@ -19,3 +19,4 @@
minutes: 1 minutes: 1
# enable this automation - This prevents duplicate pushes. # enable this automation - This prevents duplicate pushes.
- service: automation.turn_on - service: automation.turn_on
entity_id: automation.toggle_office_light_onoff

View File

@ -34,3 +34,4 @@
- delay: - delay:
minutes: 1 minutes: 1
- service: automation.turn_on - service: automation.turn_on
entity_id: automation.log_medicine_activity

View File

@ -71,12 +71,13 @@ automation:
entity_id: entity_id:
- binary_sensor.skybell_stone_door_button - binary_sensor.skybell_stone_door_button
to: 'on' to: 'on'
- platform: event # - platform: event
event_type: skybell_pressed # event_type: skybell_pressed
action: action:
# Disable this automation # Disable this automation
- service: automation.turn_off - service: automation.turn_off
entity_id: automation.log_skybell_pressed_activity
- service: script.skybell_pressed - service: script.skybell_pressed
- delay: - delay:
minutes: 1 minutes: 1

View File

@ -120,6 +120,7 @@ automation:
action: action:
- service: automation.turn_off - service: automation.turn_off
entity_id: automation.random_house_stats
- delay: '0{{ range(0,2) | random | int }}:{{ range(10,59) | random | int }}:00' - delay: '0{{ range(0,2) | random | int }}:{{ range(10,59) | random | int }}:00'
- service: script.tweet_engine - service: script.tweet_engine
data_template: data_template:
@ -144,3 +145,5 @@ automation:
"Average Cloud Coverage: {{states.sensor.dark_sky_cloud_coverage.state}}%, Average Temp: {{states.sensor.dark_sky_temperature.state}}°F #Solar" "Average Cloud Coverage: {{states.sensor.dark_sky_cloud_coverage.state}}%, Average Temp: {{states.sensor.dark_sky_temperature.state}}°F #Solar"
] | random + " #RandomStat"}} ] | random + " #RandomStat"}}
- service: automation.turn_on - service: automation.turn_on
entity_id: automation.random_house_stats

View File

@ -9,7 +9,7 @@ variables:
defaults: defaults:
hover_over: false hover_over: false
more_info: false more_info: false
rules: rules:
- element: floorplan.clock_button - element: floorplan.clock_button
@ -19,7 +19,7 @@ rules:
page_id: clock_config page_id: clock_config
- entity: sensor.clock_stacey_alarm_time - entity: sensor.clock_stacey_alarm_time
text_template: '${entity.state.slice(0, 5)}' text_template: '${entity.state ? entity.state.slice(0, 5) : "00:00"}'
- entity: input_boolean.clock_snooze - entity: input_boolean.clock_snooze

View File

@ -15,11 +15,11 @@ startup:
- service: floorplan.variable_set - service: floorplan.variable_set
data: data:
variable: floorplan.hours variable: floorplan.hours
value_template: 'return parseInt(entities["sensor.clock_stacey_alarm_time"].state.slice(0, 2));' value_template: '${parseInt(entities["sensor.clock_stacey_alarm_time"].state.slice(0, 2)) ? parseInt(entities["sensor.clock_stacey_alarm_time"].state.slice(0, 2)): "00"}'
- service: floorplan.variable_set - service: floorplan.variable_set
data: data:
variable: floorplan.minutes variable: floorplan.minutes
value_template: 'return parseInt(entities["sensor.clock_stacey_alarm_time"].state.slice(3, 5));' value_template: '${parseInt(entities["sensor.clock_stacey_alarm_time"].state.slice(3, 5)) ? parseInt(entities["sensor.clock_stacey_alarm_time"].state.slice(3, 5)): "00"}'
rules: rules:
@ -30,7 +30,7 @@ rules:
page_id: clock page_id: clock
- entity: sensor.clock_stacey_alarm_time - entity: sensor.clock_stacey_alarm_time
text_template: '${entity.state.slice(0, 5)}' text_template: '${entity.state ? entity.state.slice(0, 5) : "00:00"}'
- entities: - entities:
- floorplan.hours - floorplan.hours
@ -73,7 +73,7 @@ rules:
action: action:
service: mqtt.publish service: mqtt.publish
data_template: '{ data_template: '{
"payload": "${("0"+ entities[`floorplan.hours`].state).slice(-2)}:${("0" + entities[`floorplan.minutes`].state).slice(-2)}", "payload": "${(("0" + (parseInt((entities[`floorplan.hours`].state).slice(-2)) + 24) % 24)).slice(-2)}:${("0" + (((parseInt(entities[`floorplan.minutes`].state) / 5) * 5) % 60)).slice(-2)}",
"topic": "clock/stacey_alarm_time", "topic": "clock/stacey_alarm_time",
"retain": true "retain": true
}' }'