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

Parse temperature unit for TemperatureSensor #116

Merged
merged 12 commits into from
Jul 6, 2020
Merged

Parse temperature unit for TemperatureSensor #116

merged 12 commits into from
Jul 6, 2020

Conversation

vlebourl
Copy link
Collaborator

@vlebourl vlebourl commented Jul 6, 2020

  • Add attributes if any in the API.
  • Parse Temperature sensor for unit.

Related Github issues: #111

* Add attributes if any in the API.
* Parse Temperature sensor for unit.

Related Github issues: #111
@iMicknl iMicknl linked an issue Jul 6, 2020 that may be closed by this pull request
@vlebourl vlebourl added enhancement New feature or request platform: sensor labels Jul 6, 2020
@vlebourl vlebourl requested a review from iMicknl July 6, 2020 14:32
Copy link
Owner

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

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

Some minor comments, especially around readability / naming.

custom_components/tahoma/tahoma_api.py Show resolved Hide resolved
custom_components/tahoma/sensor.py Outdated Show resolved Hide resolved
Related Github issues: #111
vlebourl and others added 5 commits July 6, 2020 17:03
Co-authored-by: tetienne <thibaut@etienne.pw>
Co-authored-by: tetienne <thibaut@etienne.pw>
Related Github issues: #111
# Conflicts:
#	custom_components/tahoma/sensor.py
Related Github issues: #111
Related Github issues: #111
Related Github issues: #111
Related Github issues: #111
Related Github issues: #111
@@ -75,8 +78,14 @@ def unit_of_measurement(self):
states = self.tahoma_device.active_states

if CORE_TEMPERATURE_STATE in states:
# TODO Retrieve core:MeasuredValueType to understand if it is Celsius or Kelvin
return TEMP_CELSIUS
return {
Copy link
Owner

Choose a reason for hiding this comment

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

I like it!

@iMicknl iMicknl changed the title Parse temperature unit Parse temperature unit for TemperatureSensor Jul 6, 2020
@iMicknl iMicknl merged commit b56c750 into master Jul 6, 2020
@iMicknl iMicknl deleted the fix-111 branch July 6, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform: sensor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retrieve core:MeasuredValueType to understand if it is Celsius or Kelvin
3 participants