Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BedJet: expose the outlet temperature on the climate and as a sensor #6633

Merged
merged 1 commit into from May 15, 2024

Conversation

javawizard
Copy link
Contributor

@javawizard javawizard commented Apr 25, 2024

What does this implement/fix?

  • The bedjet climate platform now takes a temperature_source option that can be used to tell it whether to use the temperature of the air being discharged by the BedJet or the ambient temperature of the room it's in as the source of the climate entity's current temperature
  • Both temperatures can now be exposed via sensor platform entities
  • The bedjet_id: option is now optional on the climate entity (and the newly-introduced sensor entities) when only one bedjet: hub is defined

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3799

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml

bedjet:
  # ...

climate:
  - platform: bedjet
    name: My BedJet
    temperature_source: outlet

sensor:
  - platform: bedjet
    ambient_temperature:
      name: "My BedJet Ambient Temperature"
    outlet_temperature:
      name: "My BedJet Outlet Temperature"

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

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

@probot-esphome
Copy link

Hey there @jhansche, mind taking a look at this pull request as it has been labeled with an integration (bedjet) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@javawizard javawizard marked this pull request as draft April 25, 2024 09:07
@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.21%. Comparing base (4d8b5ed) to head (a98fbb4).
Report is 603 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6633      +/-   ##
==========================================
+ Coverage   53.70%   54.21%   +0.50%     
==========================================
  Files          50       50              
  Lines        9408     9594     +186     
  Branches     1654     1691      +37     
==========================================
+ Hits         5053     5201     +148     
- Misses       4056     4069      +13     
- Partials      299      324      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@javawizard
Copy link
Contributor Author

This is still a draft - I accidentally hit the button early. Sorry for the noise!

@javawizard javawizard force-pushed the jw/bedjet-temps branch 2 times, most recently from 18fe40a to 971a04c Compare April 25, 2024 09:49
javawizard added a commit to javawizard/esphome-docs that referenced this pull request Apr 25, 2024
@javawizard
Copy link
Contributor Author

Alright this is ready for review!

@javawizard javawizard marked this pull request as ready for review April 25, 2024 11:48
@probot-esphome
Copy link

Hey there @jhansche, mind taking a look at this pull request as it has been labeled with an integration (bedjet) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

Copy link
Contributor

@jhansche jhansche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! The code looks good - with a minor suggestion for reducing code duplication.

esphome/components/bedjet/bedjet_const.h Show resolved Hide resolved
esphome/components/bedjet/climate/bedjet_climate.cpp Outdated Show resolved Hide resolved
esphome/components/bedjet/sensor/__init__.py Show resolved Hide resolved
esphome/components/bedjet/__init__.py Show resolved Hide resolved
@javawizard javawizard force-pushed the jw/bedjet-temps branch 3 times, most recently from 5bf37e4 to 077bd0e Compare April 26, 2024 09:57
@javawizard
Copy link
Contributor Author

@jhansche - responded and pushed changes, let me know if you have any more questions!

Copy link
Contributor

@jhansche jhansche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, and thanks for the PR!
Just FYI, I can't approve it for merge, but looks good

@javawizard
Copy link
Contributor Author

No worries @jhansche, I assume @jesserockz will be along soon enough to click the button.

Thanks for taking a look at this! (And thanks for writing this awesome component in the first place 😄)

@esphome
Copy link

esphome bot commented Apr 29, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@esphome esphome bot marked this pull request as draft April 29, 2024 01:54
@javawizard javawizard marked this pull request as ready for review April 29, 2024 04:58
@esphome esphome bot requested a review from jesserockz April 29, 2024 04:58
@probot-esphome
Copy link

Hey there @jhansche, mind taking a look at this pull request as it has been labeled with an integration (bedjet) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

Copy link
Contributor

@jhansche jhansche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@javawizard not sure if Jesse filters his view, but it might help to dismiss/re-request review to show that you've made the changes

esphome/components/bedjet/sensor/__init__.py Outdated Show resolved Hide resolved
esphome/components/bedjet/sensor/__init__.py Outdated Show resolved Hide resolved
@esphome esphome bot marked this pull request as draft May 6, 2024 01:16
@javawizard javawizard marked this pull request as ready for review May 15, 2024 10:20
@esphome esphome bot requested a review from jesserockz May 15, 2024 10:20
@probot-esphome
Copy link

Hey there @jhansche, mind taking a look at this pull request as it has been labeled with an integration (bedjet) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@jesserockz jesserockz merged commit 773951d into esphome:dev May 15, 2024
56 checks passed
jesserockz added a commit to esphome/esphome-docs that referenced this pull request May 15, 2024
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants