Skip to content

Instantly share code, notes, and snippets.

@vicneanschi
Created October 8, 2018 02:50
Show Gist options
  • Save vicneanschi/f98712845d2114a75d5397eafc2a3e41 to your computer and use it in GitHub Desktop.
Save vicneanschi/f98712845d2114a75d5397eafc2a3e41 to your computer and use it in GitHub Desktop.
timur@timur-ThinkPad-T61 /etc/openhab2/rules $ cat val.rules
import java.util.Random
rule "Enable night pre-heating"
when
Time cron "0 0 19 * * ?"
then
zwave_device_7ca468ca_node3_thermostat_setpoint_heating.sendCommand(20)
zwave_device_7ca468ca_node2_thermostat_setpoint_heating.sendCommand(20)
end
rule "Enable night comfort heating"
when
Time cron "0 0 22 * * ?"
then
zwave_device_7ca468ca_node3_thermostat_setpoint_heating.sendCommand(19)
zwave_device_7ca468ca_node2_thermostat_setpoint_heating.sendCommand(19)
end
rule "Enable day eco-heating"
when
System started or
Time cron "0 0 7 * * ?"
then
zwave_device_7ca468ca_node3_thermostat_setpoint_heating.sendCommand(18)
zwave_device_7ca468ca_node2_thermostat_setpoint_heating.sendCommand(18)
end
// vim: syntax=Xtend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment