Comments (27)
How do you implement this boolean? Can you share the input_boolean.bedroom_ac_sleep entity?
from homeassistant-greeclimatecomponent.
input_boolean:
bedroom_ac_sleep:
name: Condizionatore camera sleep
initial: off
from homeassistant-greeclimatecomponent.
Can you turn on debugging for this component and paste the debug log? The boolean seems fine.
from homeassistant-greeclimatecomponent.
Here!
When I turn on the device, it was with sleep on and the boolean on lovelace was correct.
I set it to off, the device did sound, but sleep still on and after a sync also on lovelace was still on
I did operation around 16:22
[custom_components.gree.climate].log
from homeassistant-greeclimatecomponent.
Hmm. I dont use/have this feature, so its hard for me to debug.
@wjketting implemented this feature. maybe he can aid us with this issue.
from homeassistant-greeclimatecomponent.
I don't know python and so I don't how debug
from homeassistant-greeclimatecomponent.
I experienced similar strange thing about sleep mode, finally I gave it up and I implemented this feature via automation (temp decreasing/increasing + quiet mode at specified time).
I'm not use input_boolean for controling at all, because its icon don't change color (Home Assistant it is very messy in this term). I made template switches for control AC.
(Power on/off, Quiet mode and panel lights, Cold plasma/health)
from homeassistant-greeclimatecomponent.
I experienced similar strange thing about sleep mode, finally I gave it up and I implemented this feature via automation (temp decreasing/increasing + quiet mode at specified time).
I'm not use input_boolean for controling at all, because its icon don't change color (Home Assistant it is very messy in this term). I made template switches for control AC.
(Power on/off, Quiet mode and panel lights, Cold plasma/health)
It is something you like to share with me?
I want "get inspiration" from what you did!
from homeassistant-greeclimatecomponent.
Here are some code snipet.
I have Gree Amber (climate.gree_ac_1).
## Switches for control
switch:
- platform: template
switches:
ac1_onoff:
friendly_name: 'AC1 power'
value_template: >-
{% if states('climate.gree_ac_1') != 'off' %}
on
{% else %}
off
{% endif %}
turn_on:
- entity_id: climate.gree_ac_1
service: climate.turn_on
turn_off:
- entity_id: climate.gree_ac_1
service: climate.turn_off
ac1_quiet:
friendly_name: 'AC1 quiet mode'
icon_template: 'mdi:headphones'
value_template: >-
{% if state_attr('climate.gree_ac_1', 'fan_mode') == 'Quiet' %}
on
{% else %}
off
{% endif %}
turn_on:
- entity_id: climate.gree_ac_1
service: climate.set_fan_mode
data:
fan_mode: 'Quiet'
turn_off:
- entity_id: climate.gree_ac_1
service: climate.set_fan_mode
data:
fan_mode: 'Auto'
ac1_panel_light:
friendly_name: 'AC1 panel light'
icon_template: 'mdi:lightbulb-on'
value_template: "{{ states('input_boolean.ac1_panel_light') }}"
turn_on:
- entity_id: input_boolean.ac1_panel_light
service: input_boolean.turn_on
turn_off:
- entity_id: input_boolean.ac1_panel_light
service: input_boolean.turn_off
ac1_cold_plasma:
friendly_name: 'AC1 Health (cold plasma)'
icon_template: 'mdi:pine-tree'
value_template: "{{ states('input_boolean.ac1_health') }}"
turn_on:
- entity_id: input_boolean.ac1_health
service: input_boolean.turn_on
turn_off:
- entity_id: input_boolean.ac1_health
service: input_boolean.turn_off
## temperature controlling at specified time, I use AC for heating now.
## 22:00 22C, quiet on
## 07:00 23C
## 08:00 24C, quiet off
automation:
- alias: 'Klíma fűtés, 22:00, 22 fok, quiet mode on'
trigger:
- platform: time
at: '22:00:00'
condition:
condition: state
entity_id: climate.gree_ac_1
state: 'heat'
action:
- service: switch.turn_on
entity_id: switch.ac1_quiet # fan mode quiet
- delay:
seconds: 5
- service: climate.set_temperature
entity_id: climate.gree_ac_1
data_template:
temperature: 22
- alias: 'Klíma fűtés, 07:00, 23 fok'
trigger:
- platform: time
at: '07:00:00'
condition:
condition: state
entity_id: climate.gree_ac_1
state: 'heat'
action:
- service: climate.set_temperature
entity_id: climate.gree_ac_1
data_template:
temperature: 23
- alias: 'Klíma fűtés, 08:00, 24 fok, quiet mode off'
trigger:
- platform: time
at: '08:00:00'
condition:
condition: state
entity_id: climate.gree_ac_1
state: 'heat'
action:
- service: switch.turn_off
entity_id: switch.ac1_quiet # fan mode: Auto lesz
- delay:
seconds: 5
- service: climate.set_temperature
entity_id: climate.gree_ac_1
data_template:
temperature: 24
from homeassistant-greeclimatecomponent.
Here are some code snipet.
I have Gree Amber (climate.gree_ac_1).## Switches for control switch: - platform: template switches: ac1_onoff: friendly_name: 'AC1 power' value_template: >- {% if states('climate.gree_ac_1') != 'off' %} on {% else %} off {% endif %} turn_on: - entity_id: climate.gree_ac_1 service: climate.turn_on turn_off: - entity_id: climate.gree_ac_1 service: climate.turn_off ac1_quiet: friendly_name: 'AC1 quiet mode' icon_template: 'mdi:headphones' value_template: >- {% if state_attr('climate.gree_ac_1', 'fan_mode') == 'Quiet' %} on {% else %} off {% endif %} turn_on: - entity_id: climate.gree_ac_1 service: climate.set_fan_mode data: fan_mode: 'Quiet' turn_off: - entity_id: climate.gree_ac_1 service: climate.set_fan_mode data: fan_mode: 'Auto' ac1_panel_light: friendly_name: 'AC1 panel light' icon_template: 'mdi:lightbulb-on' value_template: "{{ states('input_boolean.ac1_panel_light') }}" turn_on: - entity_id: input_boolean.ac1_panel_light service: input_boolean.turn_on turn_off: - entity_id: input_boolean.ac1_panel_light service: input_boolean.turn_off ac1_cold_plasma: friendly_name: 'AC1 Health (cold plasma)' icon_template: 'mdi:pine-tree' value_template: "{{ states('input_boolean.ac1_health') }}" turn_on: - entity_id: input_boolean.ac1_health service: input_boolean.turn_on turn_off: - entity_id: input_boolean.ac1_health service: input_boolean.turn_off ## temperature controlling at specified time, I use AC for heating now. ## 22:00 22C, quiet on ## 07:00 23C ## 08:00 24C, quiet off automation: - alias: 'Klíma fűtés, 22:00, 22 fok, quiet mode on' trigger: - platform: time at: '22:00:00' condition: condition: state entity_id: climate.gree_ac_1 state: 'heat' action: - service: switch.turn_on entity_id: switch.ac1_quiet # fan mode quiet - delay: seconds: 5 - service: climate.set_temperature entity_id: climate.gree_ac_1 data_template: temperature: 22 - alias: 'Klíma fűtés, 07:00, 23 fok' trigger: - platform: time at: '07:00:00' condition: condition: state entity_id: climate.gree_ac_1 state: 'heat' action: - service: climate.set_temperature entity_id: climate.gree_ac_1 data_template: temperature: 23 - alias: 'Klíma fűtés, 08:00, 24 fok, quiet mode off' trigger: - platform: time at: '08:00:00' condition: condition: state entity_id: climate.gree_ac_1 state: 'heat' action: - service: switch.turn_off entity_id: switch.ac1_quiet # fan mode: Auto lesz - delay: seconds: 5 - service: climate.set_temperature entity_id: climate.gree_ac_1 data_template: temperature: 24
I will try to use what you do for quiet for the sleep mode
Thanks for now
from homeassistant-greeclimatecomponent.
No working: the result is the same.
I think there is a problem in one of the scripts
from homeassistant-greeclimatecomponent.
I did some test: with light, that seems the same, all it is ok.
With sleep this is what happen after I enable the switch in Home Assistant to stop the sleep
2019-12-24 17:40:10 INFO (MainThread) [custom_components.gree.climate] sleep_entity state changed |input_boolean.living_ac_sleep|<state input_boolean.living_ac_sleep=on; icon=mdi:car @ 2019-12-24T17:38:40.270750+01:00>|<state input_boolean.living_ac_sleep=off; icon=mdi:car @ 2019-12-24T17:40:10.888039+01:00> 2019-12-24 17:40:10 INFO (MainThread) [custom_components.gree.climate] Updating HVAC with changed sleep_entity state |<state input_boolean.living_ac_sleep=off; icon=mdi:car @ 2019-12-24T17:40:10.888039+01:00> 2019-12-24 17:40:11 INFO (MainThread) [custom_components.gree.climate] HA sleep option set according to HVAC state to: off 2019-12-24 17:40:42 INFO (SyncWorker_2) [custom_components.gree.climate] HA sleep option set according to HVAC state to: off 2019-12-24 17:40:42 INFO (SyncWorker_1) [custom_components.gree.climate] HA sleep option set according to HVAC state to: on 2019-12-24 17:40:42 INFO (MainThread) [custom_components.gree.climate] sleep_entity state changed |input_boolean.living_ac_sleep|<state input_boolean.living_ac_sleep=off; icon=mdi:car @ 2019-12-24T17:40:10.888039+01:00>|<state input_boolean.living_ac_sleep=on; icon=mdi:car @ 2019-12-24T17:40:42.699876+01:00>
As you can see, one of the sync thread switch to on. I cannot understand if there is a problem in the perl script or it is a problem on Gree device that don't stop the sleep
from homeassistant-greeclimatecomponent.
sorry for delayed respons.
switching sleep to off seems not to work for me either.
i'll try to look into it.
from homeassistant-greeclimatecomponent.
After a bit of testing it seems the problem is with the airco not accepting the status change for SwhSlp from 1 => 0, see summarised part of my log below.
The 8th parameter in the numbered list is SwhSlp (sleepmode).
The scripts sends 0 (acOptions => statePackJson) and receives 1 (part after Done sending etc...) back from the airco.
- Overwriting SwhSlp: 0
- Done overwriting acOptions
- acOptions: {'Pow': 1, 'Mod': 1, 'SetTem': 20, 'WdSpd': 1, 'Air': 1, 'Blo': 0, 'Health': 0, 'SwhSlp': 0, 'Lig': 0, 'SwingLfRig': 0, 'SwUpDn': 4, 'Quiet': 2, 'Tur': 0, 'StHt': 0, 'TemUn': 0, 'HeatCoolType': 0, 'TemRec': 0, 'SvSt': 0}
- Start sending state to HVAC
- statePackJson: {"opt":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt"],"p":[1,1,20,1,1,0,0,0,0,0,4,2,0,0,0,0,0,0],"t":"cmd"}
- Done sending state to HVAC: {'t': 'res', 'mac': '', 'r': 200, 'opt': ['Pow', 'Mod', 'SetTem', 'WdSpd', 'Air', 'Blo', 'Health', 'SwhSlp', 'Lig', 'SwingLfRig', 'SwUpDn', 'Quiet', 'Tur', 'StHt', 'TemUn', 'HeatCoolType', 'TemRec', 'SvSt'], 'p': [1, 1, 20, 1, 1, 0, 0, 1, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0], 'val': [1, 1, 20, 1, 1, 0, 0, 1, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0]}
If you do the same for status change for SwhSlp from 0 => 1, the airco accepts the change.
Don't know the reason. With the Gree App it is possible to switch sleep on and off and select several sleep modes (at least on my airo).
Maybe the payload used in the script is missing a parameter.
Don't know how to check and solve this any further.
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
Hi,
I have compiled and run GreeRemoteAndroid from this repo and I can already tell you that with this it is also not possible to set sleep to off. You can only turn it on. A workaround is to switch to FAN mode or other mode that excludes sleep so sleep will be set to 0.
However it is much easier to experiment using this app, and also you have the source code so modifications are pretty straightforward.
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
Leave that to me. Got them captured already. Just need to decode the packs and see whats inside. I'll compare them with what the custom app as well as Home Assistant is sending to the device. ;]
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
Ok so this is how app does it:
Activate:
{'opt': ['SwhSlp', 'SlpMod', 'SvSt', 'StHt'], 'p': [1, 1, 0, 0], 't': 'cmd'}
Dev responds:
'opt': ['SwhSlp', 'SlpMod', 'SvSt', 'StHt'], 'p': [1, 1, 0, 0], 'val': [1, 1, 0, 0]}
Deactivate:
{'opt': ['SwhSlp', 'SlpMod'], 'p': [0, 0], 't': 'cmd'}
Dev responds:
{'opt': ['SwhSlp', 'SlpMod'], 'p': [0, 0], 'val': [0, 0]}
and then status message from device:
'cols': ['Pow', 'Mod', 'TemUn', 'SetTem', 'TemRec', 'HeatCoolType', 'WdSpd', 'Tur', 'Quiet', 'SwUpDn', 'SwingLfRig', 'Air', 'Blo', 'Health', 'SvSt', 'Lig', 'StHt', 'SwhSlp', 'SlpMod', 'AllErr'], 'dat': [1, 1, 0, 24, 0, 0, 1, 0, 0, 6, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0]
So it seems that to deactivate sleep mode app sends only 2 params: SwhSlp and SlpMod
Later I will try to send such payload from python to device and see if the Sleep Mode will deactivate. Will keep you updated, also if some other captures from original app are required please let me know.
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
Pull request resolving this below.
UPDATE: I can now confirm that what we are missing is SlpMod parameter. I have sent the following request to device:
statePackJson = '{' + '"opt":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt","SlpMod"],"p":[1,4,24,1,0,0,1,1,1,0,6,0,0,0,0,0,0,0,1],"t":"cmd"}'
And this has turn the device on, set to heating, temp to 24C, Health to on, Light to on and Sleep mode to on.
Then I have sent:
statePackJson = '{' + '"opt":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt","SlpMod"],"p":[1,4,24,1,0,0,1,0,1,0,6,0,0,0,0,0,0,0,0],"t":"cmd"}'
And the sleep mode has been successfully deactivated.
So it is simply a matter of adding SlpMod at the end.
Furthermore I can confirm that not sending this parameter (i.e. SlpMod) will allow to activate the Sleep mode but since while Sleep mode is set SlpMod is set to 1 it is not possible to deactivate it without this parameter present. Just checked this as well.
Both SwhSlp and SlpMod must be present in order to deactivate Sleep mode.
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
from homeassistant-greeclimatecomponent.
You're welcome.
from homeassistant-greeclimatecomponent.
Merged & Closed
Version 2.1.0 released. Can be updates through HACS!
Thanks @everyone for all of your efforts!
from homeassistant-greeclimatecomponent.
Related Issues (20)
- one of three didnt workm [Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer] HOT 4
- Expand the auto light feature HOT 18
- new encryption method: Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer HOT 2
- ImportError: cannot import name 'EventStateChangedData' from 'homeassistant.core' HOT 2
- No input_boolean beeing created, HOT 4
- getting error : 2024-05-29 08:57:25.609 ERROR (MainThread) [homeassistant.components.climate] Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer. HOT 6
- Temperature adjustment increments for instances using imperial (Fahrenheit) HOT 1
- Does not work with latest Cooper&Hunter Smart Wi-Fi devices HOT 1
- Unable to connect to ac HOT 21
- Failed to connect to AC HOT 2
- Since upgrade to 2.12.0 Lost Climate present mode (Vertical swing mode) (EMPTY) HOT 10
- 2.12 Connection issues HOT 8
- Swing modes resets to full range option if any swing selected HOT 2
- [not a bug] v2.13 works on firmware v1.21 HOT 2
- "Anti Direct Blow" didn't work after v2.13.0 HOT 2
- can not connect to my ac HOT 3
- can not connect to my ac
- can not connect to my ac
- Setup failed for custom integration 'gree' HOT 9
- Fan speed control HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-greeclimatecomponent.