Configuration¶
There is no graphical user interface for configuring Schedy. You’ll have to express your configuration and schedules in a YAML file. However, if you’ve ever written an automation or script in Home Assistant, this is nothing you should be worried about.
This is a full configuration example with comments on each available
setting. Copy it to a .yaml
file in your apps
directory and adapt
it to your needs. The default values are provided as well. If you don’t
need a particular setting, omit it or leave it commented out.
schedy: # An arbitrary name for this instance of Schedy,
# needed e.g. for addressing events to it.
# Obligatory settings that tell appdaemon where to find the app.
# You shouldn't need to change these two.
module: hass_apps_loader
class: SchedyApp
# Enable debugging output
#debug: false
# By default, Schedy tries to restore its previous state at startup
# from the records stored in Home Assistant. This includes scheduled
# values, manual adjustments and re-scheduling times - just everything.
# When this behaviour is not desired, change this setting to true
# and Schedy will just apply the schedules at startup, no matter what
# the previous actor states were.
#reset_at_startup: false
# If you enable this option, potentially harmful expressions received
# in schedy_set_value events are evaluated.
#expressions_from_events: false
# This Python script is executed when a schedule rule expression needs to be
# evaluated. All modules you import and variables you set here will be available when
# your expression is evaluated. You can even declare classes and functions. The
# result types and expression helpers can be used in this script as well.
# Note: Don't expect this script to be executed as often as the number of rules
# you have in your schedules. The expression evaluation environment is built the
# first time a rule needs to be evaluated and then reused for all subsequent
# rules during that schedule evaluation turn.
#expression_environment: |
# import math
# import time as _time
# something = "value"
# Chose the type of actors that should be controlled by this instance
# of Schedy.
# Possible types can be found in the documentation.
#actor_type: <required>
# In the following config block, you may define templates with
# settings that affect multiple actors in your setup. These can then be
# used as a starting point for the configuration of individual actors.
# Nested inclusion of templates is possible as well.
actor_templates:
# By default, an actor inherits its settings from the "default" template.
default:
# Optionally have this template based on another one.
#template: other_template
# Actor type-specific settings can be found in the documentation.
#foo: bar
#...
# More templates ...
#other_template:
# ...
# Add schedule rules you want to have prepended to each room's schedule
# automatically here.
schedule_prepend:
# Add schedule rules you want to have appended to each room's schedule
# automatically here.
schedule_append:
# Optionally, configure schedule snippets (lists of rules) that can
# be included by expressions dynamically. See the documentation for
# an example on how to use them.
schedule_snippets:
#summer:
#- ...
# When you use expressions in your schedules that query the state of
# entities, you should tell Schedy which entities the schedules depend
# on. It can then watch for state changes of these and re-evaluate
# schedules automatically.
# Note: Entities listed here trigger a re-evaluation in all rooms. For
# entities only used in the schedules of particular rooms, use the
# per-room watched_entities list.
watched_entities:
# Each entry has to be a string consisting of up to three
# colon-separated parts:
#
# 1. The id of the entity to watch. This is mandatory.
# 2. Which attributes to watch for changes of, either a single
# attribute or a comma-separated list.
# The special value "all" listens for changes of any attribute. Try
# to avoid this whenever possible as it can increase the load
# significantly.
# Default: "state"
# 3. The re-evaluation mode as known from the schedy_reevaluate event.
# The special mode "ignore" causes no re-evaluation, it just
# suppresses the warnings generated when the entity is queried from
# an expression.
# Default: "reevaluate"
#
# Examples:
# - "binary_sensor.motion"
# - "binary_sensor.motion:all"
# - "binary_sensor.motion::reset"
# - "binary_sensor.motion:state,other_attribute:reset"
# - "binary_sensor.motion:all:ignore"
# Configure your rooms here.
rooms:
# Create such a block for every room you want to control.
#living:
# An alternative friendly name to display in logs.
#friendly_name: ...
# When you disable this setting, Schedy won't allow actors to
# change their value to something different from the scheduled
# one or the one set by a schedy_set_value event. Actors
# that change their value are then set back to the wanted one
# immediately.
#allow_manual_changes: true
# This setting controls whether changes reported by one actor
# should automatically be replicated to the other ones in this
# particular room.
#replicate_changes: true
# Set this value to a number of minutes and Schedy will
# automatically again apply the schedule after a manual change has
# been made. If you, for instance, use the thermostat actor type,
# change the target temperature at one of your thermostats and
# this value is set to 120, Schedy will again apply the schedule
# two hours after you made the change.
# 0 means not re-schedule before the next scheduled value change
# occurs.
#rescheduling_delay: 0
# All actors of this room go here.
#actors:
# This could be a thermostat.
# NOTE: Don't forget the colon after the entity id.
#climate.living1:
# Choose the template this actor should inherit its settings
# from.
# By default, an actor inherits its settings from the "default"
# template, given that you defined it.
#template: default
# We could, for instance, overwrite the delta defined in the
# template for this particular thermostat only.
#delta: 0.0
# The room's schedule, consisting of multiple rules.
schedule:
#- ...
# The same as the global watched_entities above, but these only
# trigger a re-evaluation for this particular room.
watched_entities:
#- ...
# Configure statistical parameters to be collected.
statistics:
# Pick an arbitrary name for the parameter instance.
#some_name:
# The type of parameter as found in the actor'S documentation.
#type: <required>
# More parameter-specific settings ...
# More parameter instances ...