AutomationDataset/Desperado88/description-ready.json

893 lines
53 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[
{
"id": "karotz_dev_horloge_parlante_automation",
"automation": "- id: karotz_dev_horloge_parlante_automation\n alias: Karotz dev - Annonce de l'heure\n description: Fait annoncer l'heure par le Karotz dev toutes les heures\n trigger:\n - trigger: time_pattern\n minutes: '0'\n condition:\n - condition: time\n after: 07:00:00\n before: '20:00:00'\n action:\n - action: rest_command.karotz_dev_clock",
"config": []
},
{
"id": "karotz_dev - Courrier retirée",
"automation": "- alias: karotz_dev - Courrier retirée\n description: ''\n triggers:\n - entity_id: binary_sensor.eth01_status_lettre\n to: 'off'\n trigger: state\n actions:\n - data:\n entity_id: input_number.karotz_dev_ear_left\n value: '{{ states(''input_number.karotz_dev_saved_ear_left'') | int }}'\n action: input_number.set_value\n - data:\n entity_id: input_number.karotz_dev_ear_right\n value: '{{ states(''input_number.karotz_dev_saved_ear_right'') | int }}'\n action: input_number.set_value\n - data:\n entity_id: input_text.karotz_dev_color_1\n value: '{{ states(''input_text.karotz_dev_saved_color_1'') }}'\n action: input_text.set_value\n - data:\n entity_id: input_text.karotz_dev_color_2\n value: '{{ states(''input_text.karotz_dev_saved_color_2'') }}'\n action: input_text.set_value\n - data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{{ states(''input_number.karotz_dev_saved_light_speed'') | int }}'\n action: input_number.set_value\n - action: rest_command.karotz_dev_light\n data: {}\n - action: rest_command.karotz_dev_ears\n data: {}",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev saved ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_saved_ear_left",
"device_id": null
}
},
{
"name": "karotz dev saved ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_saved_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_2",
"device_id": null
}
},
{
"name": "karotz dev saved color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_saved_color_1",
"device_id": null
}
},
{
"name": "karotz dev saved color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_saved_color_2",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "karotz dev saved light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_saved_light_speed",
"device_id": null
}
},
{
"name": "eth01 status lettre",
"room": null,
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.eth01_status_lettre",
"device_id": null
}
}
]
},
{
"id": "karotz_dev - Il y a du courrier",
"automation": "- alias: karotz_dev - Il y a du courrier\n description: ''\n triggers:\n - minutes: '45'\n trigger: time_pattern\n conditions:\n - condition: time\n after: 07:00:00\n before: '20:00:00'\n enabled: true\n - condition: state\n entity_id: binary_sensor.eth01_status_lettre\n state: 'on'\n actions:\n - data:\n entity_id: input_text.karotz_dev_saved_color_1\n value: '{{ states(''input_text.karotz_dev_color_1'') }}'\n action: input_text.set_value\n - data:\n entity_id: input_text.karotz_dev_saved_color_2\n value: '{{ states(''input_text.karotz_dev_color_2'') }}'\n action: input_text.set_value\n - data:\n entity_id: input_number.karotz_dev_saved_light_speed\n value: '{{ states(''input_number.karotz_dev_light_speed'') | int }}'\n action: input_number.set_value\n - data:\n entity_id: input_number.karotz_dev_saved_ear_left\n value: '{{ states(''input_number.karotz_dev_ear_left'') | int }}'\n action: input_number.set_value\n - data:\n entity_id: input_number.karotz_dev_saved_ear_right\n value: '{{ states(''input_number.karotz_dev_ear_right'') | int }}'\n action: input_number.set_value\n - data:\n text: \"{% set phrases = [\\n \\\"Une lettre cosmique vient d'atterrir.\\\",\\n \\\"\\\n Le courrier est arrivé, capitaine.\\\",\\n \\\"Message en provenance d'une autre\\\n \\ galaxie détecté.\\\",\\n \\\"Il y a du courrier dans la boîte aux lettres.\\\"\\\n ,\\n \\\"Le facteur stellaire a fait sa livraison.\\\"\\n] %} {{ phrases | random\\\n \\ }}\\n\"\n action: rest_command.karotz_dev_say\n - data:\n entity_id: input_text.karotz_dev_color_1\n value: 00FF00\n action: input_text.set_value\n - action: input_boolean.turn_on\n target:\n entity_id: input_boolean.karotz_dev_light_fixed_mode\n data: {}\n - delay:\n hours: 0\n minutes: 0\n seconds: 1\n milliseconds: 0\n - action: rest_command.karotz_dev_light_fixed\n metadata: {}\n data: {}",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev saved ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_saved_ear_left",
"device_id": null
}
},
{
"name": "karotz dev saved ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_saved_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_2",
"device_id": null
}
},
{
"name": "karotz dev saved color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_saved_color_1",
"device_id": null
}
},
{
"name": "karotz dev saved color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_saved_color_2",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "karotz dev saved light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_saved_light_speed",
"device_id": null
}
},
{
"name": "karotz dev light fixed mode",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.karotz_dev_light_fixed_mode",
"device_id": null
}
},
{
"name": "eth01 status lettre",
"room": null,
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.eth01_status_lettre",
"device_id": null
}
}
]
},
{
"id": "karotz_dev - Cuisine",
"automation": "- alias: karotz_dev - Cuisine\n description: karotz_dev réagit à l'allumage de la cuisine, puis reprend son état\n triggers:\n - type: turned_on\n device_id: 26e2c20e7bdc25f3ee9e158db8a7ada9\n entity_id: 4047c432f33eacd0d26280b195f15772\n domain: switch\n trigger: device\n conditions: []\n actions:\n - delay:\n hours: 0\n minutes: 0\n seconds: 10\n milliseconds: 0\n - variables:\n ear_left_prev: '{{ states(''input_number.karotz_dev_ear_left'') | int }}'\n ear_right_prev: '{{ states(''input_number.karotz_dev_ear_right'') | int }}'\n color1_prev: '{{ states(''input_text.karotz_dev_color_1'') }}'\n color2_prev: '{{ states(''input_text.karotz_dev_color_2'') }}'\n speed_prev: '{{ states(''input_number.karotz_dev_light_speed'') | int }}'\n - action: rest_command.karotz_dev_ears_random\n data: {}\n - data:\n text: \"{% set phrases = [\\n \\\"Huuuuuummm, ça sent bon la carotte ici !\\\",\\n\\\n \\ \\\"Tu cuisines ou tu fais une potion magique ?\\\",\\n \\\"Attention à ne pas\\\n \\ brûler les poêles, cest pas un barbekiou !\\\",\\n \\\"Le chef karotz dev est\\\n \\ impressionné !\\\",\\n \\\"Jespère que cest pour moi ce festin !\\\"\\n] %} {{\\\n \\ phrases | random }}\\n\"\n action: rest_command.karotz_dev_say\n - data:\n value: '{{ ear_left_prev }}'\n target:\n entity_id: input_number.karotz_dev_ear_left\n action: input_number.set_value\n - data:\n value: '{{ ear_right_prev }}'\n target:\n entity_id: input_number.karotz_dev_ear_right\n action: input_number.set_value\n - data:\n entity_id: input_text.karotz_dev_color_1\n value: '{{ color1_prev }}'\n action: input_text.set_value\n - data:\n entity_id: input_text.karotz_dev_color_2\n value: '{{ color2_prev }}'\n action: input_text.set_value\n - data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{{ speed_prev }}'\n action: input_number.set_value\n - action: rest_command.karotz_dev_light\n data: {}\n - action: rest_command.karotz_dev_ears\n data: {}\n - delay:\n hours: 0\n minutes: 5\n seconds: 0\n milliseconds: 0\n mode: single",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_2",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "kitchen switch",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "4047c432f33eacd0d26280b195f15772",
"device_id": "26e2c20e7bdc25f3ee9e158db8a7ada9"
}
}
]
},
{
"id": "karotz_dev - test tag",
"automation": "- alias: karotz_dev - test tag\n description: ''\n triggers:\n - webhook_id: tag-lapin-test\n allowed_methods:\n - GET\n local_only: true\n trigger: webhook\n conditions: []\n actions:\n - data:\n text: Bonjour, je m'appel karotz !\n action: rest_command.karotz_dev_say\n mode: single",
"config": []
},
{
"id": "karotz_dev - Son sur ouverture porte garage",
"automation": "- alias: karotz_dev - Son sur ouverture porte garage\n description: Joue le son 'bling' quand la porte du garage s'ouvre\n triggers:\n - entity_id: binary_sensor.porte_garage\n to: 'on'\n trigger: state\n conditions: []\n actions:\n - data:\n sound: jet1\n action: rest_command.karotz_dev_sound\n - data:\n text: \"{% set phrases = [\\n \\\"La porte du hangar spatial est ouverte.\\\",\\n\\\n \\ \\\"Le sas du garage est désormais déverrouillé.\\\",\\n \\\"Ouverture du portail\\\n \\ galactique confirmée.\\\",\\n \\\"Le garage s'ouvre sur l'infini et au-delà.\\\"\\\n ,\\n \\\"Accès au vaisseau terrestre autorisé.\\\"\\n] %} {{ phrases | random }}\\n\"\n action: rest_command.karotz_dev_say\n mode: single",
"config": [
{
"name": "porte garage",
"room": "garage",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.porte_garage",
"device_id": null
}
}
]
},
{
"id": "Karotz - Réveil à 8h",
"automation": "- alias: Karotz - Réveil à 8h\n trigger:\n - platform: time\n at: 08:00:00\n action:\n - service: rest_command.karotz_dev_wakeup\n - delay: 00:00:05\n - service: script.karotz_daily_loop",
"config": [
{
"name": "Karotz Daily Loop",
"room": null,
"type": "script",
"id": {
"entity_id": "script.karotz_daily_loop",
"device_id": null
}
}
]
},
{
"id": "Karotz - Rappel déjeuner (12h30)",
"automation": "- alias: Karotz - Rappel déjeuner (12h30)\n trigger:\n - platform: time\n at: '12:30:00'\n action:\n - service: script.karotz_intro_effect\n - delay: 00:00:01\n - service: rest_command.karotz_dev_say\n data:\n text: '{{ state_attr(''input_select.karotz_meal_phrases'',''options'') | random\n }}'",
"config": [
{
"name": "karotz meal phrases",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.karotz_meal_phrases",
"device_id": null
}
},
{
"name": "Karotz Intro Effect",
"room": null,
"type": "script",
"id": {
"entity_id": "script.karotz_intro_effect",
"device_id": null
}
}
]
},
{
"id": "Karotz - Rappel départ (16h30)",
"automation": "- alias: Karotz - Rappel départ (16h30)\n trigger:\n - platform: time\n at: '16:30:00'\n action:\n - service: script.karotz_intro_effect\n - delay: 00:00:01\n - service: rest_command.karotz_dev_say\n data:\n text: '{{ state_attr(''input_select.karotz_departure_phrases'',''options'')\n | random }}'",
"config": [
{
"name": "karotz departure phrases",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.karotz_departure_phrases",
"device_id": null
}
},
{
"name": "Karotz Intro Effect",
"room": null,
"type": "script",
"id": {
"entity_id": "script.karotz_intro_effect",
"device_id": null
}
}
]
},
{
"id": "Karotz - Sommeil à 17h",
"automation": "- alias: Karotz - Sommeil à 17h\n trigger:\n - platform: time\n at: '17:00:00'\n action:\n - service: rest_command.karotz_dev_sleep",
"config": []
},
{
"id": "karotz_dev_on_automation",
"automation": "- id: karotz_dev_on_automation\n alias: karotz_dev On\n trigger:\n - trigger: state\n entity_id: sensor.karotz_dev_status\n attribute: sleep\n to: '0'\n action:\n - action: input_boolean.turn_on\n target:\n entity_id: input_boolean.karotz_dev_awake",
"config": [
{
"name": "karotz dev status",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.karotz_dev_status",
"device_id": null
}
},
{
"name": "karotz dev awake",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.karotz_dev_awake",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_off_automation",
"automation": "- id: karotz_dev_off_automation\n alias: karotz_dev Off\n trigger:\n - trigger: state\n entity_id: sensor.karotz_dev_status\n attribute: sleep\n to: '1'\n action:\n - action: input_boolean.turn_off\n target:\n entity_id: input_boolean.karotz_dev_awake",
"config": [
{
"name": "karotz dev status",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.karotz_dev_status",
"device_id": null
}
},
{
"name": "karotz dev awake",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.karotz_dev_awake",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_color_automation",
"automation": "- id: karotz_dev_color_automation\n alias: karotz_dev Update Color\n trigger:\n - trigger: state\n entity_id:\n - input_text.karotz_dev_color_1\n - input_text.karotz_dev_color_2\n - input_number.karotz_dev_light_speed\n action:\n - action: rest_command.karotz_dev_light",
"config": [
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_2",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_ear_automation",
"automation": "- id: karotz_dev_ear_automation\n alias: karotz_dev Update Ears\n trigger:\n - trigger: state\n entity_id:\n - input_number.karotz_dev_ear_left\n - input_number.karotz_dev_ear_right\n action:\n - action: rest_command.karotz_dev_ears",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_light_mode_automation",
"automation": "- id: karotz_dev_light_mode_automation\n alias: karotz_dev Light Mode Automation\n trigger:\n - trigger: state\n entity_id: input_boolean.karotz_dev_light_fixed_mode\n action:\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.karotz_dev_light_fixed_mode\n state: 'on'\n sequence:\n - action: rest_command.karotz_dev_light_fixed\n - conditions:\n - condition: state\n entity_id: input_boolean.karotz_dev_light_fixed_mode\n state: 'off'\n sequence:\n - action: rest_command.karotz_dev_light",
"config": [
{
"name": "karotz dev light fixed mode",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.karotz_dev_light_fixed_mode",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_volume_automation",
"automation": "- id: karotz_dev_volume_automation\n alias: karotz_dev Update Volume\n trigger:\n - trigger: state\n entity_id: input_number.karotz_dev_volume\n action:\n - action: rest_command.karotz_dev_volume\n data:\n level: '{{ states(''input_number.karotz_dev_volume'') | int }}'",
"config": [
{
"name": "karotz dev volume",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_volume",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_clear_cache_auto",
"automation": "- id: karotz_dev_clear_cache_auto\n alias: karotz_dev - Clear cache si mémoire > 80%\n trigger:\n - trigger: numeric_state\n entity_id: sensor.karotz_dev_status\n above: 80\n action:\n - action: rest_command.karotz_dev_clear_cache",
"config": [
{
"name": "karotz dev status",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.karotz_dev_status",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_meteo_automation",
"automation": "- id: karotz_dev_meteo_automation\n alias: karotz_dev - Réaction météo h/30\n description: Adapte les oreilles, la LED et le clignotement selon les conditions\n météo\n trigger:\n - trigger: time_pattern\n minutes: '30'\n condition:\n - condition: time\n after: 07:00:00\n before: '19:00:00'\n actions:\n - action: rest_command.karotz_dev_say\n data:\n text: Voici la météo.\n - action: rest_command.karotz_dev_ears_reset\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_left\n value: \"{% set rain_str = states('sensor.[ville]_rain_chance') %} {% set rain\\\n \\ = rain_str if rain_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 0 %} {% set rain = rain | float %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif\\\n \\ rain > 60 %}\\n {{ 4 }}\\n{% else %}\\n {{ (15 - ((rain - 5) // 5)) | int\\\n \\ }}\\n{% endif %}\\n\"\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_right\n value: \"{% set rain_str = states('sensor.[ville]_rain_chance') %} {% set rain\\\n \\ = rain_str if rain_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 0 %} {% set rain = rain | float %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif\\\n \\ rain > 60 %}\\n {{ 4 }}\\n{% else %}\\n {{ (15 - ((rain - 5) // 5)) | int\\\n \\ }}\\n{% endif %}\\n\"\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_1\n value: '{% set temp = states(''sensor.pac_atom_temp_ext'') | default(20) | float\n %} {% if temp <= -10 %}ADD8E6 {% elif temp <= -5 %}87CEFA {% elif temp <=\n 0 %}00CED1 {% elif temp <= 5 %}40E0D0 {% elif temp <= 10 %}90EE90 {% elif\n temp <= 15 %}ADFF2F {% elif temp <= 20 %}FFD700 {% elif temp <= 25 %}FFA500\n {% elif temp <= 30 %}FF4500 {% else %}FF0000{% endif %}\n\n '\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_2\n value: '000000'\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{% set wind = states(''sensor.weather_station_vitesse_moyenne_du_vent_km_h'')\n | default(0) | float %} {% set base = 2000 %} {% set min_speed = 100 %} {%\n set decrement = ((wind // 5) * 150) %} {% set result = base - decrement %}\n {% if result < min_speed %}{{ min_speed }}{% elif result > base %}{{ base\n }}{% else %}{{ result | int }}{% endif %}\n\n '\n - action: rest_command.karotz_dev_light\n - action: rest_command.karotz_dev_ears\n - action: rest_command.karotz_dev_say\n data:\n text: \"{% set temp_str = states('sensor.pac_atom_temp_ext') %} {% set temp =\\\n \\ temp_str if temp_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 20 %} {% set temp = temp | float %}\\n{% set wind_str = states('sensor.weather_station_vitesse_moyenne_du_vent_km_h')\\\n \\ %} {% set wind = wind_str if wind_str not in ['unavailable', 'unknown',\\\n \\ 'none', ''] else 0 %} {% set wind = wind | float %}\\n{% set rain_str = states('sensor.[ville]_rain_chance')\\\n \\ %} {% set rain = rain_str if rain_str not in ['unavailable', 'unknown',\\\n \\ 'none', ''] else 0 %} {% set rain = rain | float %}\\n{% set alerte = states('sensor.44_weather_alert')\\\n \\ | default('') | lower %}\\nLa température est de {{ temp | round(0) }} degrés.\\\n \\ Le vent souffle à {{ wind | round(0) }} kilomètres par heure. Le risque\\\n \\ de pluie est de {{ rain | round(0) }} pourcents. {% if 'orange' in alerte\\\n \\ %}\\n Attention, une alerte météo orange est en cours.\\n{% elif 'rouge'\\\n \\ in alerte %}\\n Attention, une alerte météo rouge est en cours. Restez vigilant.\\n\\\n {% endif %}\"\n mode: single",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_2",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "ville rain chance",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.[ville]_rain_chance",
"device_id": null
}
},
{
"name": "pac atom temp ext",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.pac_atom_temp_ext",
"device_id": null
}
},
{
"name": "weather station vitesse moyenne du vent km h",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.weather_station_vitesse_moyenne_du_vent_km_h",
"device_id": null
}
},
{
"name": "44 weather alert",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.44_weather_alert",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_meteo_jour",
"automation": "- id: karotz_dev_meteo_jour\n alias: karotz_dev - Météo du jour 7h15\n description: Annonce la météo du jour via Karotz_dev\n triggers:\n - trigger: time\n at: 07:15:00\n conditions: []\n actions:\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_left\n value: \"{% set rain_str = states('sensor.[ville]_rain_chance') %} {% set rain\\\n \\ = rain_str if rain_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 0 %} {% set rain = rain | float %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif\\\n \\ rain > 60 %}\\n {{ 4 }}\\n{% else %}\\n {{ (15 - ((rain - 5) // 5)) | int\\\n \\ }}\\n{% endif %}\\n\"\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_right\n value: \"{% set rain_str = states('sensor.[ville]_rain_chance') %} {% set rain\\\n \\ = rain_str if rain_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 0 %} {% set rain = rain | float %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif\\\n \\ rain > 60 %}\\n {{ 4 }}\\n{% else %}\\n {{ (15 - ((rain - 5) // 5)) | int\\\n \\ }}\\n{% endif %}\\n\"\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_1\n value: '{% set temp = state_attr(''sensor.prevision_meteo_aujourd_hui'', ''temperature'')\n | default(20) | float %} {% if temp <= -10 %}ADD8E6 {% elif temp <= -5 %}87CEFA\n {% elif temp <= 0 %}00CED1 {% elif temp <= 5 %}40E0D0 {% elif temp <= 10 %}90EE90\n {% elif temp <= 15 %}ADFF2F {% elif temp <= 20 %}FFD700 {% elif temp <= 25\n %}FFA500 {% elif temp <= 30 %}FF4500 {% else %}FF0000{% endif %}\n\n '\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{% set wind = state_attr(''sensor.prevision_meteo_aujourd_hui'', ''wind_speed'')\n | default(0) | float %} {% set base = 2000 %} {% set min_speed = 100 %} {%\n set decrement = ((wind // 5) * 150) %} {% set result = base - decrement %}\n {% if result < min_speed %}{{ min_speed }}{% elif result > base %}{{ base\n }}{% else %}{{ result | int }}{% endif %}\n\n '\n - action: rest_command.karotz_dev_light\n - action: rest_command.karotz_dev_ears\n - action: rest_command.karotz_dev_say\n metadata: {}\n data:\n text: \"{% set conditions = {\\n 'sunny': 'ensoleillé',\\n 'clear-night': 'nuit\\\n \\ dégagée',\\n 'cloudy': 'nuageux',\\n 'partlycloudy': 'partiellement nuageux',\\n\\\n \\ 'fog': 'brouillard',\\n 'windy': 'venteux',\\n 'windy-variant': 'variablement\\\n \\ venteux',\\n 'hail': 'grêle',\\n 'lightning': 'orages',\\n 'lightning-rainy':\\\n \\ 'orages avec pluie',\\n 'pouring': 'fortes pluies',\\n 'rainy': 'pluvieux',\\n\\\n \\ 'snowy': 'enneigé',\\n 'snowy-rainy': 'neige et pluie',\\n 'exceptional':\\\n \\ 'conditions exceptionnelles'\\n} %} {% set condition = states('sensor.prevision_meteo_aujourd_hui')\\\n \\ %} {% set condition_fr = conditions.get(condition, condition) %}\\nVoici\\\n \\ la météo prévue pour aujourd'hui. Le temps sera {{ condition_fr }}. Température\\\n \\ maximale : {{\\n state_attr('sensor.prevision_meteo_aujourd_hui', 'temperature')\\\n \\ | default(0) | float | round(0)\\n}} degrés. Température minimale : {{\\n\\\n \\ state_attr('sensor.prevision_meteo_aujourd_hui', 'templow') | default(0)\\\n \\ | float | round(0)\\n}} degrés. {% set pluie = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'precipitation_probability') %} {% if pluie != 'n/a' and pluie is not none\\\n \\ %}\\n Risque de pluie : {{ pluie }} pourcents.\\n{% endif %} {% set nuages\\\n \\ = state_attr('sensor.prevision_meteo_aujourd_hui', 'cloud_coverage') %}\\\n \\ {% if nuages != 'n/a' and nuages is not none %}\\n Couverture nuageuse :\\\n \\ {{ nuages }} pourcents.\\n{% endif %} Vent : {{\\n state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'wind_speed') | default(0) | float | round(0)\\n}} kilomètres par heure.\\\n \\ {% set uv =\\n state_attr('sensor.prevision_meteo_aujourd_hui', 'uv_index')\\\n \\ |\\n default(0) %} Indice UV : {{ uv }} sur 10.\"\n mode: single",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "ville rain chance",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.[ville]_rain_chance",
"device_id": null
}
},
{
"name": "prevision meteo aujourd hui",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.prevision_meteo_aujourd_hui",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_meteo_demain",
"automation": "- id: karotz_dev_meteo_demain\n alias: Karotz_dev - Météo de demain à 19h05\n description: Annonce la météo de demain via Karotz_dev\n triggers:\n - trigger: time\n at: '19:05:00'\n conditions: []\n actions:\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_left\n value: \"{% set rain_str = states('sensor.[ville]_rain_chance') %} {% set rain\\\n \\ = rain_str if rain_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 0 %} {% set rain = rain | float %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif\\\n \\ rain > 60 %}\\n {{ 4 }}\\n{% else %}\\n {{ (15 - ((rain - 5) // 5)) | int\\\n \\ }}\\n{% endif %}\\n\"\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_right\n value: \"{% set rain_str = states('sensor.[ville]_rain_chance') %} {% set rain\\\n \\ = rain_str if rain_str not in ['unavailable', 'unknown', 'none', ''] else\\\n \\ 0 %} {% set rain = rain | float %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif\\\n \\ rain > 60 %}\\n {{ 4 }}\\n{% else %}\\n {{ (15 - ((rain - 5) // 5)) | int\\\n \\ }}\\n{% endif %}\\n\"\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_1\n value: '{% set temp = state_attr(''sensor.prevision_meteo_aujourd_hui'', ''temperature'')\n | default(20) | float %} {% if temp <= -10 %}ADD8E6 {% elif temp <= -5 %}87CEFA\n {% elif temp <= 0 %}00CED1 {% elif temp <= 5 %}40E0D0 {% elif temp <= 10 %}90EE90\n {% elif temp <= 15 %}ADFF2F {% elif temp <= 20 %}FFD700 {% elif temp <= 25\n %}FFA500 {% elif temp <= 30 %}FF4500 {% else %}FF0000{% endif %}\n\n '\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{% set wind = state_attr(''sensor.prevision_meteo_aujourd_hui'', ''wind_speed'')\n | default(0) | float %} {% set base = 2000 %} {% set min_speed = 100 %} {%\n set decrement = ((wind // 5) * 150) %} {% set result = base - decrement %}\n {% if result < min_speed %}{{ min_speed }}{% elif result > base %}{{ base\n }}{% else %}{{ result | int }}{% endif %}\n\n '\n - action: rest_command.karotz_dev_light\n - action: rest_command.karotz_dev_ears\n - action: rest_command.karotz_dev_say\n metadata: {}\n data:\n text: \"{% set conditions = {\\n 'sunny': 'ensoleillé',\\n 'clear-night': 'nuit\\\n \\ dégagée',\\n 'cloudy': 'nuageux',\\n 'partlycloudy': 'partiellement nuageux',\\n\\\n \\ 'fog': 'brouillard',\\n 'windy': 'venteux',\\n 'windy-variant': 'variablement\\\n \\ venteux',\\n 'hail': 'grêle',\\n 'lightning': 'orages',\\n 'lightning-rainy':\\\n \\ 'orages avec pluie',\\n 'pouring': 'fortes pluies',\\n 'rainy': 'pluvieux',\\n\\\n \\ 'snowy': 'enneigé',\\n 'snowy-rainy': 'neige et pluie',\\n 'exceptional':\\\n \\ 'conditions exceptionnelles'\\n} %} {% set condition = states('sensor.prevision_meteo_demain')\\\n \\ %} {% set condition_fr = conditions.get(condition, condition) %}\\nVoici\\\n \\ la météo prévue pour demain. Le temps sera {{ condition_fr }}. Température\\\n \\ maximale : {{ state_attr('sensor.prevision_meteo_demain', 'temperature')\\\n \\ | default(0) | float | round(0) }} degrés. Température minimale : {{ state_attr('sensor.prevision_meteo_demain',\\\n \\ 'templow') | default(0) | float | round(0) }} degrés. {% set pluie = state_attr('sensor.prevision_meteo_demain',\\\n \\ 'precipitation_probability') %} {% if pluie != 'n/a' %}\\n Risque de pluie\\\n \\ : {{ pluie }} pourcents. \\n{% endif %} {% set nuages = state_attr('sensor.prevision_meteo_demain',\\\n \\ 'cloud_coverage') %} {% if nuages != 'n/a' %} \\n Couverture nuageuse :\\\n \\ {{ nuages }} pourcents. \\n{% endif %} Vent : {{ state_attr('sensor.prevision_meteo_demain',\\\n \\ 'wind_speed') | default(0) | float | round(0) }} kilomètres par heure. \\\n \\ Indice UV : {{ state_attr('sensor.prevision_meteo_demain', 'uv_index') }}\\\n \\ sur 10.\"\n mode: single",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "ville rain chance",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.[ville]_rain_chance",
"device_id": null
}
},
{
"name": "prevision meteo aujourd hui",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.prevision_meteo_aujourd_hui",
"device_id": null
}
},
{
"name": "prevision meteo demain",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.prevision_meteo_demain",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_meteo_automation",
"automation": "- id: karotz_dev_meteo_automation\n alias: karotz_dev - Réaction météo\n description: Adapte les oreilles, la LED et le clignotement selon les conditions\n météo\n trigger:\n - trigger: time_pattern\n minutes: '15'\n condition:\n - condition: time\n after: 07:00:00\n before: '19:00:00'\n actions:\n - action: rest_command.karotz_dev_say\n data:\n text: Voici la météo.\n - action: rest_command.karotz_dev_ears_reset\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_left\n value: \"{% set rain = states('sensor.[ville]_rain_chance') | default(0) | float\\\n \\ %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif rain > 60 %}\\n {{ 4 }}\\n{% else\\\n \\ %}\\n {{ (15 - ((rain - 5) // 5)) | int }}\\n{% endif %}\\n\"\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_right\n value: \"{% set rain = states('sensor.[ville]_rain_chance') | default(0) | float\\\n \\ %} {% if rain < 5 %}\\n {{ 15 }}\\n{% elif rain > 60 %}\\n {{ 4 }}\\n{% else\\\n \\ %}\\n {{ (15 - ((rain - 5) // 5)) | int }}\\n{% endif %}\\n\"\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_1\n value: '{% set temp = states(''sensor.[temperature]'') | default(20) | float\n %} {% if temp <= -10 %}ADD8E6 {% elif temp <= -5 %}87CEFA {% elif temp <=\n 0 %}00CED1 {% elif temp <= 5 %}40E0D0 {% elif temp <= 10 %}90EE90 {% elif\n temp <= 15 %}ADFF2F {% elif temp <= 20 %}FFD700 {% elif temp <= 25 %}FFA500\n {% elif temp <= 30 %}FF4500 {% else %}FF0000{% endif %}\n\n '\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_2\n value: '000000'\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{% set wind = states(''sensor.[vitesse du vent]'') | default(0) | float\n %} {% set base = 2000 %} {% set min_speed = 100 %} {% set decrement = ((wind\n // 5) * 150) %} {% set result = base - decrement %} {% if result < min_speed\n %}{{ min_speed }}{% elif result > base %}{{ base }}{% else %}{{ result | int\n }}{% endif %}\n\n '\n - action: rest_command.karotz_dev_light\n - action: rest_command.karotz_dev_ears\n - action: rest_command.karotz_dev_say\n data:\n text: \"La température est de {{ states('sensor.[temperature]') | default(20)\\\n \\ | float | round(0) }} degrés. Le vent souffle à {{ states('sensor.[vitesse\\\n \\ du vent]') | default(0) | float | round(0) }} kilomètres par heure. Le risque\\\n \\ de pluie est de {{ states('sensor.[ville]_rain_chance') | default(0) | float\\\n \\ | round(0) }} pourcents. {% set alerte = states('sensor.44_weather_alert')\\\n \\ | default('') | lower %} {% if 'orange' in alerte %}\\n Attention, une alerte\\\n \\ météo **orange** est en cours.\\n{% elif 'rouge' in alerte %}\\n Attention,\\\n \\ une alerte météo **rouge** est en cours. Restez vigilant.\\n{% endif %}\"\n mode: single",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev color 2",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_2",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "ville rain chance",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.[ville]_rain_chance",
"device_id": null
}
},
{
"name": "44 weather alert",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.44_weather_alert",
"device_id": null
}
},
{
"name": "temperature sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.[temperature]",
"device_id": null
}
},
{
"name": "vitesse du vent sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.[vitesse du vent]",
"device_id": null
}
}
]
},
{
"id": "Karotz_dev - Météo de demain à 19h05",
"automation": "- alias: Karotz_dev - Météo de demain à 19h05\n description: Annonce la météo de demain via Karotz_dev\n triggers:\n - trigger: time\n at: '19:05:00'\n conditions: []\n actions:\n - action: rest_command.karotz_dev_say\n metadata: {}\n data:\n text: \"{% set conditions = {\\n 'sunny': 'ensoleillé',\\n 'clear-night': 'nuit\\\n \\ dégagée',\\n 'cloudy': 'nuageux',\\n 'partlycloudy': 'partiellement nuageux',\\n\\\n \\ 'fog': 'brouillard',\\n 'windy': 'venteux',\\n 'windy-variant': 'variablement\\\n \\ venteux',\\n 'hail': 'grêle',\\n 'lightning': 'orages',\\n 'lightning-rainy':\\\n \\ 'orages avec pluie',\\n 'pouring': 'fortes pluies',\\n 'rainy': 'pluvieux',\\n\\\n \\ 'snowy': 'enneigé',\\n 'snowy-rainy': 'neige et pluie',\\n 'exceptional':\\\n \\ 'conditions exceptionnelles'\\n} %} {% set condition = states('sensor.prevision_meteo_demain')\\\n \\ %} {% set condition_fr = conditions.get(condition, condition) %}\\nVoici\\\n \\ la météo prévue pour demain. Le temps sera {{ condition_fr }}. Température\\\n \\ maximale : {{ state_attr('sensor.prevision_meteo_demain', 'temperature')\\\n \\ | default(0) | float | round(0) }} degrés. Température minimale : {{ state_attr('sensor.prevision_meteo_demain',\\\n \\ 'templow') | default(0) | float | round(0) }} degrés. {% set pluie = state_attr('sensor.prevision_meteo_demain',\\\n \\ 'precipitation_probability') %} {% if pluie != 'n/a' %}\\n Risque de pluie\\\n \\ : {{ pluie }} pourcents. \\n{% endif %} {% set nuages = state_attr('sensor.prevision_meteo_demain',\\\n \\ 'cloud_coverage') %} {% if nuages != 'n/a' %} \\n Couverture nuageuse :\\\n \\ {{ nuages }} pourcents. \\n{% endif %} Vent : {{ state_attr('sensor.prevision_meteo_demain',\\\n \\ 'wind_speed') | default(0) | float | round(0) }} kilomètres par heure. \\\n \\ Indice UV : {{ state_attr('sensor.prevision_meteo_demain', 'uv_index') }}\\\n \\ sur 10.\"\n mode: single",
"config": [
{
"name": "prevision meteo demain",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.prevision_meteo_demain",
"device_id": null
}
}
]
},
{
"id": "karotz_dev_meteo_jour",
"automation": "- id: karotz_dev_meteo_jour\n alias: karotz_dev - Météo du jour 7h15\n description: Annonce la météo du jour via Karotz_dev\n triggers:\n - trigger: time\n at: 07:15:00\n conditions: []\n actions:\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_left\n value: \"{% set pluie_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'precipitation_probability') %} {% set pluie = pluie_str if pluie_str not\\\n \\ in ['unavailable', 'unknown', 'none', '', 'n/a'] else 0 %} {% set pluie\\\n \\ = pluie | float %} {% if pluie < 5 %}\\n {{ 15 }}\\n{% elif pluie > 60 %}\\n\\\n \\ {{ 4 }}\\n{% else %}\\n {{ (15 - ((pluie - 5) // 5)) | int }}\\n{% endif\\\n \\ %}\\n\"\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_ear_right\n value: \"{% set pluie_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'precipitation_probability') %} {% set pluie = pluie_str if pluie_str not\\\n \\ in ['unavailable', 'unknown', 'none', '', 'n/a'] else 0 %} {% set pluie\\\n \\ = pluie | float %} {% if pluie < 5 %}\\n {{ 15 }}\\n{% elif pluie > 60 %}\\n\\\n \\ {{ 4 }}\\n{% else %}\\n {{ (15 - ((pluie - 5) // 5)) | int }}\\n{% endif\\\n \\ %}\\n\"\n - action: input_text.set_value\n data:\n entity_id: input_text.karotz_dev_color_1\n value: '{% set temp_str = state_attr(''sensor.prevision_meteo_aujourd_hui'',\n ''temperature'') %} {% set temp = temp_str if temp_str not in [''unavailable'',\n ''unknown'', ''none'', '''', ''n/a''] else 20 %} {% set temp = temp | float\n %} {% if temp <= -10 %}ADD8E6 {% elif temp <= -5 %}87CEFA {% elif temp <=\n 0 %}00CED1 {% elif temp <= 5 %}40E0D0 {% elif temp <= 10 %}90EE90 {% elif\n temp <= 15 %}ADFF2F {% elif temp <= 20 %}FFD700 {% elif temp <= 25 %}FFA500\n {% elif temp <= 30 %}FF4500 {% else %}FF0000{% endif %}\n\n '\n - action: input_number.set_value\n data:\n entity_id: input_number.karotz_dev_light_speed\n value: '{% set wind_str = state_attr(''sensor.prevision_meteo_aujourd_hui'',\n ''wind_speed'') %} {% set wind = wind_str if wind_str not in [''unavailable'',\n ''unknown'', ''none'', '''', ''n/a''] else 0 %} {% set wind = wind | float\n %} {% set base = 2000 %} {% set min_speed = 100 %} {% set decrement = ((wind\n // 5) * 150) %} {% set result = base - decrement %} {% if result < min_speed\n %}{{ min_speed }}{% elif result > base %}{{ base }}{% else %}{{ result | int\n }}{% endif %}\n\n '\n - action: rest_command.karotz_dev_light\n - action: rest_command.karotz_dev_ears\n - action: rest_command.karotz_dev_say\n metadata: {}\n data:\n text: \"{% set conditions = {\\n 'sunny': 'ensoleillé',\\n 'clear-night': 'nuit\\\n \\ dégagée',\\n 'cloudy': 'nuageux',\\n 'partlycloudy': 'partiellement nuageux',\\n\\\n \\ 'fog': 'brouillard',\\n 'windy': 'venteux',\\n 'windy-variant': 'variablement\\\n \\ venteux',\\n 'hail': 'grêle',\\n 'lightning': 'orages',\\n 'lightning-rainy':\\\n \\ 'orages avec pluie',\\n 'pouring': 'fortes pluies',\\n 'rainy': 'pluvieux',\\n\\\n \\ 'snowy': 'enneigé',\\n 'snowy-rainy': 'neige et pluie',\\n 'exceptional':\\\n \\ 'conditions exceptionnelles'\\n} %} {% set condition = states('sensor.prevision_meteo_aujourd_hui')\\\n \\ %} {% set condition_fr = conditions.get(condition, condition) %}\\nVoici\\\n \\ la météo prévue pour aujourd'hui. Le temps sera {{ condition_fr }}. \\n{%\\\n \\ set temp_str = state_attr('sensor.prevision_meteo_aujourd_hui', 'temperature')\\\n \\ %} {% if temp_str not in ['unavailable', 'unknown', 'none', '', 'n/a'] %}\\n\\\n \\ Température maximale : {{ temp_str | float | round(0) }} degrés.\\n{% endif\\\n \\ %}\\n{% set temp_min_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'templow') %} {% if temp_min_str not in ['unavailable', 'unknown', 'none',\\\n \\ '', 'n/a'] %}\\n Température minimale : {{ temp_min_str | float | round(0)\\\n \\ }} degrés.\\n{% endif %}\\n{% set pluie_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'precipitation_probability') %} {% if pluie_str not in ['unavailable', 'unknown',\\\n \\ 'none', '', 'n/a'] %}\\n Risque de pluie : {{ pluie_str }} pourcents.\\n\\\n {% endif %}\\n{% set nuages_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'cloud_coverage') %} {% if nuages_str not in ['unavailable', 'unknown',\\\n \\ 'none', '', 'n/a'] %}\\n Couverture nuageuse : {{ nuages_str }} pourcents.\\n\\\n {% endif %}\\n{% set vent_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'wind_speed') %} {% if vent_str not in ['unavailable', 'unknown', 'none',\\\n \\ '', 'n/a'] %}\\n Vent : {{ vent_str | float | round(0) }} kilomètres par\\\n \\ heure.\\n{% endif %}\\n{% set uv_str = state_attr('sensor.prevision_meteo_aujourd_hui',\\\n \\ 'uv_index') %} {% if uv_str not in ['unavailable', 'unknown', 'none', '',\\\n \\ 'n/a'] %}\\n Indice UV : {{ uv_str }} sur 10.\\n{% endif %}\\n{% set source\\\n \\ = state_attr('sensor.prevision_meteo_aujourd_hui', 'source') | default('Météo-France')\\\n \\ %} {% if source == 'Sauvegarde de la veille' %}\\n Données basées sur les\\\n \\ prévisions de la veille.\\n{% endif %}\"\n mode: single",
"config": [
{
"name": "karotz dev ear left",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_left",
"device_id": null
}
},
{
"name": "karotz dev ear right",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_ear_right",
"device_id": null
}
},
{
"name": "karotz dev color 1",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.karotz_dev_color_1",
"device_id": null
}
},
{
"name": "karotz dev light speed",
"room": null,
"type": "input_number",
"id": {
"entity_id": "input_number.karotz_dev_light_speed",
"device_id": null
}
},
{
"name": "prevision meteo aujourd hui",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.prevision_meteo_aujourd_hui",
"device_id": null
}
}
]
}
]