Rinnai Tankless Water Heater: Manual and Automatic temperature adjustments

I was trying to use GoogleHome/HomeKit to adjust the temperature of my Rinnai Tankless heater and ran into so many problems. So I started over and used a generic_thermostat integration named Faucet. Note that a couple of fields are required but not used so they were defined with xxx

climate:
  - platform: generic_thermostat
    name: Faucet
    initial_hvac_mode: heat
    unique_id: thermostat_faucet
    heater: switch.xxx
    target_sensor: sensor.xxx
    min_temp: 120
    max_temp: 140
    precision: 1.0

after exposing Faucet to GH/HomeKit so then a simple command like:

Hey Google, set Faucet to 125 degrees

This will change the Temperature attribute on the “thermostat”.

This automation will adjust the tankless heater when any state of Faucet changes.


alias: FaucetStateChanged
description: When genric therm faucet changes, update waterheater to match
trigger:
  - platform: state
    entity_id:
      - climate.faucet
condition:
  - condition: template
    value_template: "{{ (states.climate.faucet.state != \"off\")}}"
    enabled: true
action:
  - service: water_heater.set_temperature
    data:
      temperature: "{{ state_attr('climate.faucet', 'temperature') }}"
    target:
      entity_id: water_heater.your_rinnai_water_heater
    enabled: true
mode: single

Of course you can use Faucet in Lovelace and other automations/scripts etc.

Now I like a lower temperature for things like washing my hands, so I usually keep it at 120°. But if I’m taking a shower I might like it higher, so I can adjust it with my voice. But now I was thinking (insert joke here), why not adjust the temperature automatically? So what would a trigger look like? What attributes of the Rinnai might determine someone is hot water more than washing hands?