Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107567

Copying an attribute of a light to a sensor (by template?)

$
0
0

Hi,
I am using a from HA unsupported tuya device to measure the water level. Within tuya I therefore change the brightness of a lamp depending on the water level, i.e. 90% water level = 90% brightness.

The lamp can be seen and worked with in HA. Now, I would like to copy this brightness value in a template sensor variable, which I later can display i.e. as a gauge. I only worked with sensors as a source in templates.

This isn’t working, but you might get an idea what I am looking for:

      - name: "MeterL Water Prozent"
        device_class: power
        unit_of_measurement: "%"
        state: "{{ ( states('light.l_f_jnb_watertank_level.brightness') | float | round(0))  }}"

Thanks!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 107567

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>