-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mockupancy routines. #3
Comments
|
- alias: 'Get Random Time'
trigger:
platform: time
after: '21:00:00'
action:
- service: input_slider.select_value
data_template:
entity_id: input_slider.hour
value: '{{ (range(22, 23) | random) }}'
- service: input_slider.select_value
data_template:
entity_id: input_slider.random_minute
value: '{{ (range(30, 45) | random) }}'
Then simply use that in your light turn off automation:
- alias: 'Turn lights off'
trigger:
platform: template
value_template: '{{ now.hour == (states.input_slider.random_hour.state | int) and now.minute == (states.input_slider.random_minute.state | int) }}'
action:
- service: light.turn_off
data:
entity_id: light.hue_color_lamp_1
|
- alias: AUTO ON (MOTION) Downstairs Bathroom Light
trigger:
platform: state
entity_id: sensor.aeotec_zw100_multisensor_6_burglar_24_10
from: '0'
to: '8'
action:
service: scene.turn_on
data_template:
entity_id: >
{% set hour=states("sensor.time").split(':')[0] | int %}
{%- if hour >= 19 or hour < 6 -%}
scene.downstairs_bathroom_late_night
{%- elif hour >= 6 or hour <9 -%}
scene.downstairs_bathroom_early_morning
{%- else -%}
scene.downstairs_bathroom_mid_day
{%- endif %}
|
#96 - Random Dog Barks. |
If not around for 18 hours, trigger Vacation Mode.. (Moccupancy routines.) |
{{states.group.all_lights.attributes.entity_id | random }} I think I would create a new group in the package called group.mockupancy with appropriate lights and then just shut down the whole group after a random amount of time. |
Love the idea of using an Event to call the routine at the end of the routine for a great loop. Found in kylegordon/home-assistant-config#1 alias: Simulate presence (4a)'
trigger:
- platform: state
entity_id: group.all_devices
from: 'home'
to: 'not_home'
- platform: sun
event: sunset
- platform: event
event_type: event_simulate_presence
condition:
condition: and
conditions:
- condition: state
entity_id: 'sun.sun'
state: 'below_horizon'
- condition: time
before: '23:01:00'
- condition: state
entity_id: group.all_devices
state: 'not_home'
action:
# https://home-assistant.io/cookbook/perform_actions_based_on_input_select/
# https://home-assistant.io/getting-started/scripts/
- service: light.turn_on
data_template:
entity_id: >
light.lamp_{{ (range(1, 6) | random) }}
# wait some seconds (will be in reality in minutes)
- delay: '00:{{ (range(2, 10) | random) }}:00'
# turn off all devices
- service: light.turn_off
# wait a little bit before turning on another lamp
- delay: '00:00:{{ (range(1, 5) | random) }}'
# generate an event to call again this automation rule
- event: event_simulate_presence
|
Nice find! This is going to help with my washing machine is complete reminder. |
#892 - If vacation mode is enabled, Put Water Heater in Vacation Mode as well. |
Looks like there is a HACS component for this. https://github.com/slashback100/presence_simulation
|
Add routines to simulate occupancy when we are away.
The text was updated successfully, but these errors were encountered: