Advertisement
Guest User

Weather RGB

a guest
Aug 29th, 2023
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.14 KB | Software | 0 0
  1. alias: 🌅🌡️🪼Weather Jelly
  2. description: >-
  3.   Turn on Abbott the jellyfish lamp at 6am to a color related to the forecasted
  4.   high temp. >80=red, >70=orange, >60=yellow, >50=green, >30=blue, >0=icy blue,
  5.   <1=purple
  6. trigger:
  7.   - platform: time
  8.     at: "06:00:00"
  9. condition: []
  10. action:
  11.   - choose:
  12.       - conditions:
  13.           - condition: numeric_state
  14.             entity_id: sensor.openweathermap_forecast_temperature
  15.             above: 80
  16.         sequence:
  17.           - service: light.turn_on
  18.             data:
  19.               hs_color:
  20.                - 0
  21.                 - 100
  22.               brightness_pct: 10
  23.             target:
  24.               entity_id: light.abbott
  25.       - conditions:
  26.           - condition: numeric_state
  27.             entity_id: sensor.openweathermap_forecast_temperature
  28.             above: 70
  29.         sequence:
  30.           - service: light.turn_on
  31.             data:
  32.               brightness_pct: 10
  33.               hs_color:
  34.                - 47
  35.                 - 100
  36.             target:
  37.               entity_id: light.abbott
  38.       - conditions:
  39.           - condition: numeric_state
  40.             entity_id: sensor.openweathermap_forecast_temperature
  41.             above: 60
  42.         sequence:
  43.           - service: light.turn_on
  44.             data:
  45.               brightness_pct: 10
  46.               hs_color:
  47.                - 60
  48.                 - 100
  49.             target:
  50.               entity_id: light.abbott
  51.       - conditions:
  52.           - condition: numeric_state
  53.             entity_id: sensor.openweathermap_forecast_temperature
  54.             above: 50
  55.         sequence:
  56.           - service: light.turn_on
  57.             data:
  58.               brightness_pct: 10
  59.               hs_color:
  60.                - 120
  61.                 - 100
  62.             target:
  63.               entity_id: light.abbott
  64.       - conditions:
  65.           - condition: numeric_state
  66.             entity_id: sensor.openweathermap_forecast_temperature
  67.             above: 30
  68.         sequence:
  69.           - service: light.turn_on
  70.             data:
  71.               brightness_pct: 10
  72.               hs_color:
  73.                - 240
  74.                 - 100
  75.             target:
  76.               entity_id: light.abbott
  77.       - conditions:
  78.           - condition: numeric_state
  79.             entity_id: sensor.openweathermap_forecast_temperature
  80.             above: 0
  81.         sequence:
  82.           - service: light.turn_on
  83.             data:
  84.               brightness_pct: 10
  85.               hs_color:
  86.                - 200
  87.                 - 100
  88.             target:
  89.               entity_id: light.abbott
  90.       - conditions:
  91.           - condition: numeric_state
  92.             entity_id: sensor.openweathermap_forecast_temperature
  93.             below: 1
  94.         sequence:
  95.           - service: light.turn_on
  96.             data:
  97.               brightness_pct: 10
  98.               hs_color:
  99.                - 270
  100.                 - 100
  101.             target:
  102.               entity_id: light.abbott
  103.   - delay:
  104.       hours: 0
  105.       minutes: 30
  106.       seconds: 0
  107.       milliseconds: 0
  108.   - service: light.turn_off
  109.     data: {}
  110.     target:
  111.       entity_id: light.abbott
  112. mode: single
  113.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement