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

Add support for TemSen sensor to get current temperature in newer firmware #13

Closed
cmroche opened this issue Oct 29, 2020 · 4 comments · Fixed by #27
Closed

Add support for TemSen sensor to get current temperature in newer firmware #13

cmroche opened this issue Oct 29, 2020 · 4 comments · Fixed by #27
Labels
enhancement New feature or request released

Comments

@cmroche
Copy link
Owner

cmroche commented Oct 29, 2020

Some devices, supporting firmware 3.7 and later, will report TemSen to give the current sensor's ambient temperature. Add support for this property in the device.

See: tomikaa87/gree-remote#31

@cmroche cmroche added the enhancement New feature or request label Oct 29, 2020
@xuefer
Copy link
Contributor

xuefer commented Nov 27, 2020

My AC device firmware is V 4, or 2.1? since I'm using gree+ app in Chinese I can't tell which number correspond to your 3.7 or so
https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent.git support using external sensor as current_temperature. Without this feature in greeclimate, I have to use ugly automation+python. Can you please implement this feature

- id: '1605326973946'
  alias: climate_temperature
  description: Feed gree temperature
  trigger:
  - platform: state
    entity_id: sensor.workroom_temperature
  - platform: state
    entity_id: climate.workroom
  - platform: state
    entity_id: sensor.livingroom_temperature
  - platform: state
    entity_id: climate.livingroom
  condition: []
  action:
  - service: python_script.climate_update
    data_template:
      climate: climate.{{ trigger.entity_id | replace('climate.', '') | replace('sensor.',
        '') | replace('_temperature', '') }}
      sensor: sensor.{{ trigger.entity_id | replace('climate.', '') | replace('sensor.',
        '') | replace('_temperature', '') }}_temperature
  mode: parallel
  max: 10

python_scripts/climate_update.py

climate_id  = data.get('climate')
sensor_id  = data.get('sensor')

if climate_id != "" and sensor_id != "":
   sensor = hass.states.get(sensor_id)
   temp = sensor.state
   if temp is not None and temp is not "Unknown":
      climate = hass.states.get(climate_id)
      attributes = climate.attributes.copy()
      attributes['current_temperature'] = temp
      hass.states.set(climate_id, climate.state, attributes)
else:
   logger.error("Wrong data.")

@cmroche
Copy link
Owner Author

cmroche commented Nov 27, 2020

2.1 will be the server version.

I'm still working on the overhaul to discovery, but I'll come back to this once I am done there. I don't have a device that support this feature, so I'll need help gather information, likely through the test application again, so that I can get the information needed to implement the feature.

@xuefer
Copy link
Contributor

xuefer commented Nov 27, 2020

implemented in #26 and cmroche/core@gree-switch...xuefer:gree-switch just to demo. more work need to be done in /gree.py for collecting information from other user about the +40C difference. (yet I wonder firmware version in debug log is empty)

@github-actions
Copy link

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants