Hello,
Short version of my question(s):
- I am trying to create an event that will set my Hue Sync brightness to the level of another (virtual) device. This global brightness virtual device changes throughout the day (part of a circadian lighting setup).
- I believe the Hue Sync box device uses a level value from 0.0 to 1.0. My virtual device goes from 0 to 100, so I need to add the mathematical expression to divide the virtual device level by 100.
Longer version
Very new to Home Assistant; sorry if this question is obvious. I have spent a long time trying to figure it out on my own before posting. I am currently using Home Assistant connected to Homeseer to support some devices Homeseer does not support.
I use a virtual device that all my lights reference for level. The virtual device changes throughout the day for circadian lighting. I want to set the Hue Sync box brightness level to this virtual device’s level but have not been able to figure it out. Below is the automation I am working on, though I honestly have no idea what I am doing, so I am sure it is totally wrong:
alias: Sync_Level
description: ""
trigger:
- platform: state
entity_id:
- light.hass_virtuals_global_tod_related_hass_tod_level_virtual
attribute: brightness
condition: []
action:
- service: huesyncbox.set_brightness
data:
brightness: >-
{{
states('light.hass_virtuals_global_tod_related_hass_tod_level_virtual')
| float(0) / 100 }}
target:
device_id: 713b9b62292cf163aae01a088bb83c34
mode: single
Thank you very much for your help! Please let me know if I did not include any information that is needed to advise me.