jheling / freeathome

Free@Home component for Home Assistant
112 stars 41 forks source link

Added additional valve attribute #57

Closed steffenaxer closed 4 years ago

steffenaxer commented 4 years ago

A free@home thermostat controlls actuators that moves heating valves. I added a functionalty to retrive the current actuator/valve postion (measured in percentage) in order to oberserve the heating activities of each room.

dbrouwer1979 commented 4 years ago

Hi, I have added your repository to my HA. How dit you manage the valves to show up? I only got 4 new scenes extra as entities.

steffenaxer commented 4 years ago

Hi, I added the current_temperature and valve attribute as a sensor into my configuration.yaml:

sensor:
  - platform: template
    sensors:
      temp_schlafzimmer:
        value_template: "{{ state_attr('climate.schlafzimmer', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_wohnzimmer:
        value_template: "{{ state_attr('climate.wohnzimmer', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_kuche:
        value_template: "{{ state_attr('climate.kuche', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_kinderzimmer_1:
        value_template: "{{ state_attr('climate.kinderzimmer_1', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_kinderzimmer_2:
        value_template: "{{ state_attr('climate.kinderzimmer_2', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_hwr:
        value_template: "{{ state_attr('climate.hwr', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_gaste_wc:
        value_template: "{{ state_attr('climate.gaste_wc', 'current_temperature') }}"
        unit_of_measurement: "°C"
      temp_badezimmer:
        value_template: "{{ state_attr('climate.badezimmer', 'current_temperature') }}"
        unit_of_measurement: "°C"
      valve_schlafzimmer:
        value_template: "{{ state_attr('climate.schlafzimmer', 'valve') }}"
        unit_of_measurement: "%"
      valve_wohnzimmer:
        value_template: "{{ state_attr('climate.wohnzimmer', 'valve') }}"
        unit_of_measurement: "%"
      valve_kuche:
        value_template: "{{ state_attr('climate.kuche', 'valve') }}"
        unit_of_measurement: "%"
      valve_kinderzimmer_1:
        value_template: "{{ state_attr('climate.kinderzimmer_1', 'valve') }}"
        unit_of_measurement: "%"
      valve_kinderzimmer_2:
        value_template: "{{ state_attr('climate.kinderzimmer_2', 'valve') }}"
        unit_of_measurement: "%"
      valve_hwr:
        value_template: "{{ state_attr('climate.hwr', 'valve') }}"
        unit_of_measurement: "%"
      valve_gaste_wc:
        value_template: "{{ state_attr('climate.gaste_wc', 'valve') }}"
        unit_of_measurement: "%"
      valve_badezimmer:
        value_template: "{{ state_attr('climate.badezimmer', 'valve') }}"
        unit_of_measurement: "%"

After this step, you could simply add these values to a history chart in your lovelace gui editor:

entities:
  - entity: sensor.valve_wohnzimmer
    name: Wohnzimmer
  - entity: sensor.valve_schlafzimmer
    name: Schlafzimmer
  - entity: sensor.valve_kinderzimmer_1
    name: Kind 1
  - entity: sensor.valve_kinderzimmer_2
    name: Kind 2
  - entity: sensor.valve_badezimmer
    name: Badezimmer
  - entity: sensor.valve_kuche
    name: Küche
  - entity: sensor.valve_gaste_wc
    name: Gäste WC
  - entity: sensor.valve_hwr
    name: HWR
hours_to_show: 24
refresh_interval: 60
title: Heizungsaktoren
type: history-graph
dbrouwer1979 commented 4 years ago

Thank you! I will try this tonight!

steffenaxer commented 4 years ago

Find attached an example, how it would look like:

Unbenannt

dbrouwer1979 commented 4 years ago

Ah nice! I will let you know what I'm getting. I wonder if I van do something with the scene's it now discoverd. It looks like those are the actors of my livingroom underfloor heating.

jheling commented 4 years ago

Nice work!