#philip hue lamps

1 messages · Page 1 of 1 (latest)

manic turtle
#

good afternoon, is there a way that I can add my philips hue lamps to my consumption?

manic turtle
#

template:

#
  • sensor:
    - name: "hue color spot 1 power"
    state: >
    {% if is_state('light.hue_color_spot_1', 'on') %}
    5
    {% else %}
    0
    {% endif %}
    unit_of_measurement: "W"
    device_class: energy
    state_class: total_increasing
    unique_id: "spot_1_slaapkamer_dylan"
    icon: "mdi:lightbulb"
    • sensor:
      • name: "Hue Color Spot 1 Energy"
        unique_id: "hue_color_spot_1_energy"
        state_class: total_increasing
        unit_of_measurement: "kWh"
        device_class: energy
        state: "{{ (states('sensor.hue_color_spot_1_power') | float * 0.001 / 60) | round(6)}}"
#

when i try this i get wrong values

dense storm
#

The power sensor should be:

    device_class: power
    state_class: measurement
#

Use a riemann sum (integration) helper for the energy sensor, not a template