Set dimmer2 light from HA

  • Hi, i have OverTemp problem with my dimmer 2 when light is between 70% and 99%.

    I'd like to create an automation in HA that reduce light to 65% if temp is > 98C° and light is ON.

    But i dont know how to set an EVENT to set light at 65%. I i can do it?

    Thanks

    alias: DimmerOverTemp

    description: In caso di alta temperatura imposta luce al 65%

    trigger:

    - type: temperature

    platform: device

    device_id: 9758227197bec1ce6b8efab3dexxxxxx

    entity_id: sensor.dimmer_device_temperature

    domain: sensor

    above: 98

    for:

    hours: 0

    minutes: 0

    seconds: 5

    condition:

    - condition: device

    type: is_on

    device_id: 9758227197bec1ce6b8efab3dexxxxx

    entity_id: light.dimmer

    domain: light

    action:

    - event: ""

    event_data: {}

    mode: single