Darksky Temperature Automation

Hi,
I am trying to automate the lights in my bathroom based on the temperature outside.
I have normal lights and warm lights. I want warm lights to be on when the temperature is below 15C, otherwise normal lights. At any point, only one light should be active.

my configuration.yaml has been setup successfully.

weather:
  - platform: darksky
    api_key: mysecretkey

how and where should i setup the darksky sensors? i don’t see them listed in the entities

Here’s my automation, please kindly help complete. Thanks


- alias: Bathroom Lights
  trigger:
    platform: state
    entity_id: binary_sensor.motion_sensor
    from: 'off'
    to: 'on'
  condition:
*please help*
  action:
*please help*
    - service: switch.turn_on
      entity_id: switch.normallights      
    - service: switch.turn_off
      entity_id: switch.warmlights

try setting up the Darksky Sensor instead of the “weather” integration.

It should provide you with a list of sensors that you can include with the “monitored_conditions:” config.

1 Like

I did follow that,
but i get this error after adding monitored_conditions:

182

This is in my Configuration.yaml

weather:
  - platform: darksky
    api_key: mysecretkey
    monitored_conditions:
      - summary
      - icon
      - temperature

The configuration should be under ‘sensors:’ in your config file, not ‘weather:’ - see the first example at https://www.home-assistant.io/components/darksky/

1 Like

Feel so silly, how i missed that. Let me try the automation now. Thanks.