Drayton Wiser Home Assistant Integration

The settings are retained if you reload, using the reload option from the … menu under the Wiser integration in Settings > Devices and Services

1 Like

Sorry for the newbie question. Where does one use that code to get those cool new graphs and entities?

It depends how you have organised your config files.

If you don’t have a line like this

template: !include template.yaml

in configuration.yaml you can add the lines into configuration.yaml.

If you do have that line then put them into template.yaml without the platform:template line at the start.

1 Like

You need to create .yaml files, I have to admit it is quite a steep learning curve, and impossible to demonstrate in a short post.

There are sooo many different entity types and associated definition files, but sensors and template sensors for me covers the majority.

What I do is to create a folder in the /config folder i.e. /config/custom and then in there you can either create folders if you have a lot of yamls, or just create individual yaml files.

Then, in the configuration.yaml file you need to tell HA where to read your custom files, i.e.:

#################
## FILE OVERRIDES
#################
binary_sensor       : !include custom/yaml/binary.yaml
camera              : !include custom/yaml/camera.yaml
device_tracker      : !include custom/yaml/device_tracker.yaml

################
## DIR OVERRIDES
################
# !include_dir_list, !include_dir_named, !include_dir_merge_list, !include_dir_merge_named

notify              : !include_dir_merge_list custom/yaml/notify
sensor              : !include_dir_merge_list custom/yaml/sensor
template            : !include_dir_merge_list custom/yaml/template

Then you need to test your configs using Developer Tools > Check Configuration

Many of the config overrides require a restart to load them, but always be sure to check configuration first.

and YAML, like PYTHON is very particular about indentation.

1 Like

They are template binary sensors, in order:

Heating: binary_sensor.wiser_hub_heating_demand
Boiler: binary_sensor.wiser_hub_heating
Room: binary_sensor.living_room_heating_demand
TRV: binary_sensor.living_room_heating

- binary_sensor:

    # Wiser Hub Heating Demand binary sensor
    - name: Wiser Hub Heating Demand
      icon: >-
        {%- if is_state('binary_sensor.wiser_hub_heating_demand', 'on') -%}
          mdi:radiator
        {%- else -%}
          mdi:radiator-disabled
        {%- endif -%}
      state: >-
        {%- if is_state('sensor.wiser_hub_heating_demand', '0') -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      attributes:
        Percentage demand: "{{ state_attr('sensor.wiser_hub_heating', 'percentage_demand_Channel-1') }}"
        Room IDs: "{{ state_attr('sensor.wiser_hub_heating', 'room_ids_Channel-1') }}"
        Is smartvalve preventing demand: "{{ state_attr('sensor.wiser_hub_heating', 'is_smartvalve_preventing_demand_Channel-1') }}"

   # Wiser Hub Heating binary sensor
    - name: Wiser Hub Heating
      icon: >-
        {%- if is_state('binary_sensor.wiser_hub_heating', 'on') -%}
          mdi:radiator
        {%- else -%}
          mdi:radiator-disabled
        {%- endif -%}
      state: >-
        {%- if is_state('sensor.wiser_hub_heating', 'On') -%}
          on
        {%- else -%}
          off
        {%- endif -%}
      attributes:
        Percentage demand: "{{ state_attr('sensor.wiser_hub_heating', 'percentage_demand_Channel-1') }}"
        Room IDs: "{{ state_attr('sensor.wiser_hub_heating', 'room_ids_Channel-1') }}"
        Is smartvalve preventing demand: "{{ state_attr('sensor.wiser_hub_heating', 'is_smartvalve_preventing_demand_Channel-1') }}"

    # Living Room Heating Demand binary sensor
    - name: Living Room Heating Demand
      icon: >-
        {%- if is_state('binary_sensor.living_room_heating_demand', 'on') -%}
          mdi:radiator
        {%- else -%}
          mdi:radiator-disabled
        {%- endif -%}
      state: >-
        {%- if is_state('sensor.living_room_climate_heating_demand', '0') -%}
          off
        {%- else -%}
          on
        {%- endif -%}

    # Living Room Heating binary sensor
    - name: Living Room Heating
      icon: >-
        {%- if is_state('binary_sensor.living_room_heating', 'on') -%}
          mdi:radiator
        {%- else -%}
          mdi:radiator-disabled
        {%- endif -%}
      state: "{{ state_attr('climate.living_room_climate', 'is_heating') }}"

The “Wiser Hub Heating” one is basically just making a binary sensor from the sensor that’s provided by the integration. I’m not actually sure why it isn’t provided as a binary sensor. I think there are a few sensors like this, where it would make more sense for them to be binary sensors by default.

@msp1974 @Angelo_Santagata Is there are reason why some of the sensors that are on/off are not actually provided as binary sensors by the integration?

Yes, I was starting to wonder if that is the case myself.

I’ve actually also noticed that some radiators are coming on when others are on even though they are not calling for heat. I am theorising that it knows there is heat in the system (because other radiators are on) and the temperature is going to drop soon, so it’s opening the valves to let some heat in. Maybe. Otherwise it’s a bug.

I had previously been looking for something like these, but failed to find anything and gave up after a couple of hours of searching. These look like exactly what I was after!

EDIT: Such a pity. According to the manual, it’s only suitable for 15mm or 18mm pipework. I need something to attach to 22mm piping.

likewise i need for 22mm coming from the boiler

Right, thanks.

I just pasted your code into my sensor.yaml and I included it into my configuration.yaml. However when checking config it’s saying it’s missing “platform”.

Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 34).

Sorry for going off topic a bit on the thread.

I’m using the new way of creating template sensors. Sounds like you are still using the old method.

There appears to be some lines of code missing from the end of your pasted code for Boiler Month. Trying to use it gives an error message about no end or duration specified. Looking at the Boiler Today and Boiler Yesterday parts of your code they both have end statements.
Would it be possible for you to correct it please.

Edit
I think I’ve figured it out. The line missing at the end should be :-
end: "{{ now() }}"

Oops sorry about that, yes I have just corrected it.

The trouble with using {%- if states('sensor.wiser_hot_water') == "On" or states('sensor.wiser_heating') == "On" -%} to indicate whether the boiler is firing is that the hot water can be on (and hot water demand always shows 100% when it’s on), but not firing the boiler for long periods of time if the hot water tank thermostat has determined it’s already at temperature. Unfortunately, I can’t think of a way to avoid that. I just ignore the hot water as I’m more interested in when the heating is firing the boiler.

I agree. An perfect example of this has happened to me the last 2 days. Wiser is calling for heat but my boiler has a fault code due to a frozen condensate pipe. Would be great to alert on this state.

I think your only way is to use a current clamp on the cable. If you want to do this for heating only and not the hot water, i suggest you clamp the zone valve cable, or use a temp sensor on the heating pipe

yep, and if the wiser hub goes offline for an hour as it did this morning when there was demand, then the results will also be wrong.

But I am not really looking for perfect values, just approximations / trends

I’m getting pretty confused with this.

I’ve included the

template: !include template.yaml

But I’m getting different errors. Atm this one when removing the first platform line:

Error loading /config/configuration.yaml: expected ‘’, but found ‘’
in “/config/template.yaml”, line 11, column 1

If I don’t take it out, then Config check is fine, but the log shows different errors. Pretty confused as I understand I am messing something with the files here but don’t understand enough to know what.

- platform: template
  sensors:
  
    wiser_boiler:
      value_template: >-
        {%- if states('sensor.wiser_hot_water') == "On" or states('sensor.wiser_heating') == "On"  -%}
        {{ "On" }}
        {%- else -%}
        {{ "Off" }}
        {% endif %}

- platform: history_stats
  name: Boiler Today
  entity_id: sensor.wiser_boiler
  state: 'On'
  type: time
  start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
  end: '{{ now() }}'

- platform: history_stats
  name: Boiler Yesterday
  entity_id: sensor.wiser_boiler
  state: 'On'
  type: time
  end: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
  duration:
    hours: 24
    
- platform: history_stats
  name: Boiler Month
  entity_id: sensor.wiser_boiler
  state: 'On'
  type: time
  start: "{{ now().replace(day=1, hour=0, minute=0, second=0, microsecond=0 ) }}"
  end: "{{ now() }}"

  

- binary_sensor:

  # Wiser Hub Heating Demand binary sensor
  - name: Wiser Hub Heating Demand
    icon: >-
      {%- if is_state('binary_sensor.wiser_hub_heating_demand', 'on') -%}
        mdi:radiator
      {%- else -%}
        mdi:radiator-disabled
      {%- endif -%}
    state: >-
      {%- if is_state('sensor.wiser_hub_heating_demand', '0') -%}
        off
      {%- else -%}
        on
      {%- endif -%}
    attributes:
      Percentage demand: "{{ state_attr('sensor.wiser_hub_heating', 'percentage_demand_Channel-1') }}"
      Room IDs: "{{ state_attr('sensor.wiser_hub_heating', 'room_ids_Channel-1') }}"
      Is smartvalve preventing demand: "{{ state_attr('sensor.wiser_hub_heating', 'is_smartvalve_preventing_demand_Channel-1') }}"

 # Wiser Hub Heating binary sensor
  - name: Wiser Hub Heating
    icon: >-
      {%- if is_state('binary_sensor.wiser_hub_heating', 'on') -%}
        mdi:radiator
      {%- else -%}
        mdi:radiator-disabled
      {%- endif -%}
    state: >-
      {%- if is_state('sensor.wiser_hub_heating', 'On') -%}
        on
      {%- else -%}
        off
      {%- endif -%}
    attributes:
      Percentage demand: "{{ state_attr('sensor.wiser_hub_heating', 'percentage_demand_Channel-1') }}"
      Room IDs: "{{ state_attr('sensor.wiser_hub_heating', 'room_ids_Channel-1') }}"
      Is smartvalve preventing demand: "{{ state_attr('sensor.wiser_hub_heating', 'is_smartvalve_preventing_demand_Channel-1') }}"

  # Living Room Heating Demand binary sensor
  - name: Living Room Heating Demand
    icon: >-
      {%- if is_state('binary_sensor.living_room_heating_demand', 'on') -%}
        mdi:radiator
      {%- else -%}
        mdi:radiator-disabled
      {%- endif -%}
    state: >-
      {%- if is_state('sensor.living_room_climate_heating_demand', '0') -%}
        off
      {%- else -%}
        on
      {%- endif -%}

  # Living Room Heating binary sensor
  - name: Living Room Heating
    icon: >-
      {%- if is_state('binary_sensor.living_room_heating', 'on') -%}
        mdi:radiator
      {%- else -%}
        mdi:radiator-disabled
      {%- endif -%}
    state: "{{ state_attr('climate.living_room_climate', 'is_heating') }}"

The ps600 clips only fit 15 mm pipe. I used a cable tie to hold them to my 22mm pipes. Its a good idea to wrap insulation over the clip and the pipe to ensure the senor is at the same temp as the pipe.

1 Like

From the quick-start manual PS600-WE-QG-V002.pdf (shopify.com) it looks like it’s just a simple clamp that can be removed - so you could fabricate a bigger clamp, or even just duct tape it I guess :slight_smile:

1 Like

The problem there, at least with my system, is zone valve open does not equate to the boiler friing. The boiler may be off because of the boiler return thermostat.
In fact zone valve open will/should equate directly with wiser heating hours in the integration.

Re PS 600 Sorry yes I should have said you can remove the clamp and use you own.

1 Like