shack/glados: schlechte_luft uses new sensors
This commit is contained in:
parent
2d058d7be6
commit
b353c6ac1c
@ -1,5 +1,7 @@
|
|||||||
let
|
let
|
||||||
glados = import ../lib;
|
glados = import ../lib;
|
||||||
|
feinstaub_sensor = "sensor.fablab_particulate_matter_2_5um_concentration";
|
||||||
|
ledring = "light.fablab_led_ring";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
automation =
|
automation =
|
||||||
@ -8,15 +10,15 @@ in
|
|||||||
trigger = [
|
trigger = [
|
||||||
{
|
{
|
||||||
platform = "numeric_state";
|
platform = "numeric_state";
|
||||||
below = 25;
|
entity_id = feinstaub_sensor;
|
||||||
entity_id = "sensor.fablab_feinstaub_2_5um";
|
below = 3;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
action =
|
action =
|
||||||
[
|
[
|
||||||
{ service = "light.turn_on";
|
{ service = "light.turn_on";
|
||||||
data = {
|
data = {
|
||||||
entity_id = "light.fablab_led";
|
entity_id = ledring;
|
||||||
effect = "Twinkle";
|
effect = "Twinkle";
|
||||||
color_name = "green";
|
color_name = "green";
|
||||||
};
|
};
|
||||||
@ -25,23 +27,18 @@ in
|
|||||||
}
|
}
|
||||||
{ alias = "mäßige Luft Fablab";
|
{ alias = "mäßige Luft Fablab";
|
||||||
trigger = [
|
trigger = [
|
||||||
#{
|
|
||||||
# platform = "numeric_state";
|
|
||||||
# above = 25;
|
|
||||||
# entity_id = "sensor.fablab_feinstaub_25m";
|
|
||||||
#}
|
|
||||||
{
|
{
|
||||||
platform = "numeric_state";
|
platform = "numeric_state";
|
||||||
above = 25;
|
above = 3;
|
||||||
below = 50;
|
below = 10;
|
||||||
entity_id = "sensor.fablab_feinstaub_2_5um";
|
entity_id = feinstaub_sensor;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
action =
|
action =
|
||||||
[
|
[
|
||||||
{ service = "light.turn_on";
|
{ service = "light.turn_on";
|
||||||
data = {
|
data = {
|
||||||
entity_id = "light.fablab_led";
|
entity_id = ledring;
|
||||||
effect = "Twinkle";
|
effect = "Twinkle";
|
||||||
color_name = "yellow";
|
color_name = "yellow";
|
||||||
};
|
};
|
||||||
@ -52,16 +49,16 @@ in
|
|||||||
trigger = [
|
trigger = [
|
||||||
{
|
{
|
||||||
platform = "numeric_state";
|
platform = "numeric_state";
|
||||||
above = 50;
|
above = 10;
|
||||||
entity_id = "sensor.fablab_feinstaub_2_5um";
|
entity_id = feinstaub_sensor;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
action =
|
action =
|
||||||
[
|
[
|
||||||
{ service = "light.turn_on";
|
{ service = "light.turn_on";
|
||||||
data = {
|
data = {
|
||||||
entity_id = "light.fablab_led";
|
entity_id = ledring;
|
||||||
effect = "Twinkle";
|
effect = "Fireworks";
|
||||||
color_name = "red";
|
color_name = "red";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -72,14 +69,14 @@ in
|
|||||||
{
|
{
|
||||||
platform = "state";
|
platform = "state";
|
||||||
to = "unavailable";
|
to = "unavailable";
|
||||||
entity_id = "sensor.fablab_feinstaub_2_5um";
|
entity_id = feinstaub_sensor;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
action =
|
action =
|
||||||
[
|
[
|
||||||
{ service = "light.turn_on";
|
{ service = "light.turn_on";
|
||||||
data = {
|
data = {
|
||||||
entity_id = "light.fablab_led";
|
entity_id = ledring;
|
||||||
effect = "Rainbow";
|
effect = "Rainbow";
|
||||||
color_name = "blue";
|
color_name = "blue";
|
||||||
};
|
};
|
||||||
@ -91,14 +88,14 @@ in
|
|||||||
{
|
{
|
||||||
platform = "state";
|
platform = "state";
|
||||||
from = "unavailable";
|
from = "unavailable";
|
||||||
entity_id = "light.fablab_led";
|
entity_id = ledring;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
action =
|
action =
|
||||||
[
|
[
|
||||||
{ service = "light.turn_on";
|
{ service = "light.turn_on";
|
||||||
data = {
|
data = {
|
||||||
entity_id = "light.fablab_led";
|
entity_id = ledring;
|
||||||
effect = "Rainbow";
|
effect = "Rainbow";
|
||||||
color_name = "orange";
|
color_name = "orange";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user