This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Window open, climate off after a defined time | |
description: An automation that turns off a running your climate device for exmple a heater | |
or an air conditioning if a window sensor is open for a specific time. It waits | |
until the window is closed again in order to turn the climate entity on again. | |
domain: automation | |
input: | |
window_entity: | |
name: Window Sensor | |
description: The window sensor that controls the climate entity. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Door Sensor-activated Light | |
description: Turn on a light when door is opened. | |
domain: automation | |
input: | |
switch_target: | |
name: Monitored Switch | |
description: Switch to be monitored | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local subsystem = 'telegram' | |
etatocto = 'Etat Octoprint' | |
msg = 'L impression 3D est à présent terminée !' | |
commandArray = {} | |
if (devicechanged[etatocto] == 'Operational') then | |
commandArray['SendNotification']='subject#'..msg..'#0#sound#extradata#'..subsystem | |
end | |
return commandArray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time = os.date("*t") | |
TimeToStart = (timeofday['SunsetInMinutes'] - 30) | |
Now=(60 * time.hour + time.min) | |
commandArray = {} | |
if (devicechanged['Sonoff_Bridge_RF'] == '16110926') then | |
if (timeofday['Nighttime']) then | |
commandArray['Ta Lampe']='On FOR 1' | |
else | |
if ((Now >= TimeToStart) and (Now < timeofday['SunriseInMinutes'])) then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |