Skip to content

Add Econet new attributes#33363

Merged
bdraco merged 1 commit intohome-assistant:devfrom
richardpowellus:econet-addl-attr
Apr 2, 2020
Merged

Add Econet new attributes#33363
bdraco merged 1 commit intohome-assistant:devfrom
richardpowellus:econet-addl-attr

Conversation

@richardpowellus
Copy link
Copy Markdown
Contributor

@richardpowellus richardpowellus commented Mar 28, 2020

Proposed change

My new Rheem heat pump water heater has two temperature sensors in it. This means it no longer reports back using the old "current_temperature" attribute but now has two new attributes called "lower_temp" and "upper_temp" (yes, it has one temperature sensor at the bottom of the tank and another at the top). The reading I am getting from "current_temperature" is null which is obviously quite useless to me.

There are also two other useful pieces of information that I would like access to. Those are "ambient_temp" and "is_enabled". The former allows me to see what the temperature in my garage is and the latter allows me to see if the heat pump is actively heating.

The purpose of my change is simply to expose these 4 attributes to homeassistant. pyeconet, the underlying library that homeassistant uses to call into Rheem's Econet service, already supports, reads and propagates all four of these attributes. So I'm just tying it all neatly together into homeassistant.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes # N/A
  • This PR is related to issue: N/A
  • Link to documentation pull request: N/A (existing documentation does not document attributes like these)

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.
    -> I don't feel this is necessary. Just passing through some attributes and I have validated this using my own hot water heater and it works. Not likely to be easily broken by future code changes.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated for www.home-assistant.io
    -> Again, existing docs don't document attributes like these. It appears as though attributes like these aren't normally documented.

If the code communicates with devices, web services, or third-party tools: N/A (the library that communicates with the third party service (pyeconet) has not been changed)

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@probot-home-assistant probot-home-assistant Bot added integration: econet small-pr PRs with less than 30 lines. labels Mar 28, 2020
@MartinHjelmare MartinHjelmare changed the title Add support to the Econet integration for new attributes: lower_temp,… Add Econet new attributes Mar 29, 2020
@bdraco bdraco requested a review from w1ll1am23 April 2, 2020 23:01
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 2, 2020

@w1ll1am23 Can you take a look at this?

@w1ll1am23
Copy link
Copy Markdown
Contributor

Looks good to me 👍

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 2, 2020

Looks good to me 👍

Thanks for taking a look

@bdraco bdraco merged commit a30e217 into home-assistant:dev Apr 2, 2020
@w1ll1am23
Copy link
Copy Markdown
Contributor

@bdraco what does pyeconet return when those field aren't present do you know? Want to make sure this doesn't break heaters without it.

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 2, 2020

@bdraco what does pyeconet return when those field aren't present do you know? Want to make sure this doesn't break heaters without it.

Not sure what the api is returning for these values

https://github.com/w1ll1am23/pyeconet/blob/master/src/pyeconet/equipment/water_heater.py

Probably need to check to see if they are None before adding the attributes. I'm going to revert this

bdraco added a commit that referenced this pull request Apr 2, 2020
…er_temp, upper_temp, ambient_temp & is_enabled (#33363)"

This reverts commit a30e217.
bdraco added a commit that referenced this pull request Apr 2, 2020
…er_temp, upper_temp, ambient_temp & is_enabled (#33363)" (#33555)

This reverts commit a30e217.
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 2, 2020

@dprus Would you kindly resubmit this and check that self.water_heater.lower_temp and other other attributes are not None before adding them to to device_state_attributes

@lock lock Bot locked and limited conversation to collaborators Apr 4, 2020
@richardpowellus richardpowellus deleted the econet-addl-attr branch April 7, 2020 15:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants