Comments (21)
Thanks for the help. Fixed in version 0.8.1
from ha-dyson.
@geekofweek Unless I'm not understanding correctly, I can't reproduce this with my HP04. Mine works as it should, as I can turn the fan completely off while it's in Auto mode. Turning it back on puts it back in Auto mode.
from ha-dyson.
Your understanding is correct but not the behavior I see, I've been able to reproduce it various different ways with the same result.
from ha-dyson.
@geekofweek Can you enable debug log and see what you can find near the error log you see and after you call fan.turn_off
? Thanks.
from ha-dyson.
I think I need to re-phrase the issue. The fan does physically turn off when in the Auto Mode preset, the entity reports its state as On. This was the desired request from #12. However there is no clear way to remove the fan from the Auto Mode preset other than setting a fan speed. This might be more a feature request to add a None / Off, etc. preset mode that removes it from Auto. I have a better understanding of the way it was intended to work now.
Edit: I was incorrect, the fan does completely turn off but the entity reports the state as on so my original issue stands. The fan is turned off but reporting as on.
from ha-dyson.
@geekofweek So have you been able to shut off the fan and it reports it's state as off when in Auto Mode (just read your comment in #22)?
@shenxn The app does return the fan to the previous speed when turning Auto Mode off. Maybe create an Auto Mode switch
?
from ha-dyson.
@iceman23e Fan has to be taken out of auto mode for it to report the state as off. To remove it from auto mode I set a fan speed percentage then issue a fan.turn_off.
In short, if it is in Auto Mode it will never report the state as Off it will always be On. It will physically stop the fan until the fan detects particulate in the air and will resume operations until the air is clear. That basically mimics how Dyson does it.
from ha-dyson.
@geekofweek Ok, sorry for the questions, but if you shut your fan off from the app, does it turn completely off (screen included, if you have it) or does it function as you described?
My HP04 does not function that way. As I said, mine physically turns off and reports off when turned off from Auto Mode. If continuous monitoring is on, it will continue to report air quality, but it won't turn the fan back on. This must be something model specific. What model is your fan?
from ha-dyson.
@iceman23e So I just tested my theory and I was wrong, it does actually shut the fan off completely and operates how you stated. So I was mistaken just assuming that is how it worked based on the change for #12. So it does turn off completely and the state stays on which isn't correct.
from ha-dyson.
@geekofweek Alright great, that's at least eliminated. What model do you have?
from ha-dyson.
Dyson Pure Hot + Cool Link (HP02)
from ha-dyson.
@iceman23e I did implement a work around when this started happening, I set the fan percentage then send a fan.turn_off which will shut it off.
- service: fan.set_percentage
target:
entity_id: fan.office_fan
data:
percentage: 10
- delay: '00:00:01'
- service: fan.turn_off
entity_id:
- fan.office_fan
from ha-dyson.
@geekofweek In both this integration and the official integration, there is a distinct difference between link and non-link fans. Link fans report on
when the fan is either on
or in auto
. So, your fan is functioning as it should. My question is, what is the purpose of reporting on
in while off in auto
? The link fans must do something the non-links don't, but I don't have one to test. I suspect it might have something to do with the AirQualityTarget
link fans have.
I think the workaround would be as you said, create a None preset
or an Auto Mode switch
. My vote would be on the latter to match the functionality of the app.
from ha-dyson.
So I guess an Auto Mode switch is better than preset mode. I'll add that.
@geekofweek Are you seeing similar behavior (state still on when turning off the device directly in auto mode) in the official integration?
from ha-dyson.
Auto Mode switch is added in version 0.6.0
from ha-dyson.
@shenxn No on the official integration, at least how it was about a week ago, if you issues a fan.turn_off it would turn it off and report it off even if in Auto mode.
from ha-dyson.
OK I'll look into it. There might be a bug deep in the code. It will be very helpful if you can post the state info in debug log after calling fan.turn_off
. To turn on debug log, add the following lines into your configuration.yaml
logger:
default: info
logs:
libdyson: debug
custom_components.dyson_local: debug
from ha-dyson.
Seem to just get the same error with Debug on:
2021-03-15 11:05:47 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 282, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 602, in state_attributes
data[ATTR_SPEED] = self.speed
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 452, in speed
percentage = self.percentage
File "/config/custom_components/dyson_local/fan.py", line 145, in percentage
return ranged_value_to_percentage(SPEED_RANGE, int(self._device.speed))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
It does shut down the Climate entity and the fan itself does turn off, just state reports as on
from ha-dyson.
@geekofweek Can you find any debug log starting with New state:
before this error?
from ha-dyson.
2021-03-15 12:00:30 DEBUG (Thread-9) [libdyson.dyson_device] New state: {'msg': 'STATE-CHANGE', 'time': '2021-03-15T17:00:30.000Z', 'mode-reason': 'LAPP', 'state-reason': 'MODE', 'product-state': {'fmod': ['FAN', 'AUTO'], 'fnst': ['FAN', 'FAN'], 'fnsp': ['0007', 'AUTO'], 'qtar': ['0003', '0003'], 'oson': ['ON', 'ON'], 'rhtm': ['ON', 'ON'], 'filf': ['1102', '1102'], 'ercd': ['NONE', 'NONE'], 'nmod': ['OFF', 'OFF'], 'wacd': ['NONE', 'NONE'], 'hmod': ['OFF', 'OFF'], 'hmax': ['2960', '2960'], 'hsta': ['OFF', 'OFF'], 'ffoc': ['ON', 'ON'], 'tilt': ['OK', 'OK']}, 'scheduler': {'srsc': '85a5', 'dstv': '0001', 'tzid': '0001'}}
2021-03-15 12:00:53 DEBUG (Thread-9) [libdyson.dyson_device] New state: {'msg': 'STATE-CHANGE', 'time': '2021-03-15T17:00:53.000Z', 'mode-reason': 'LAPP', 'state-reason': 'MODE', 'product-state': {'fmod': ['AUTO', 'OFF'], 'fnst': ['FAN', 'OFF'], 'fnsp': ['AUTO', 'AUTO'], 'qtar': ['0003', '0003'], 'oson': ['ON', 'OFF'], 'rhtm': ['ON', 'ON'], 'filf': ['1102', '1102'], 'ercd': ['NONE', 'NONE'], 'nmod': ['OFF', 'OFF'], 'wacd': ['NONE', 'NONE'], 'hmod': ['OFF', 'OFF'], 'hmax': ['2960', '2960'], 'hsta': ['OFF', 'OFF'], 'ffoc': ['ON', 'ON'], 'tilt': ['OK', 'OK']}, 'scheduler': {'srsc': '85a5', 'dstv': '0001', 'tzid': '0001'}}
2021-03-15 12:00:57 DEBUG (Thread-9) [libdyson.dyson_device] New environmental state: {'msg': 'ENVIRONMENTAL-CURRENT-SENSOR-DATA', 'time': '2021-03-15T17:00:57.000Z', 'data': {'tact': '2946', 'hact': '0063', 'pact': '0002', 'vact': 'INIT', 'sltm': 'OFF'}}
from ha-dyson.
Looks resolved, nice work @shenxn
from ha-dyson.
Related Issues (20)
- Dyson Purifier Humidify Cool Formaldehyde (358K) not supported HOT 10
- Dyson Cloud never worked, using Dyson Local only now HOT 7
- Type 438K Fails to Connect HOT 3
- Stopped working? HOT 20
- Core 2022.2.0: Sensor has device class temperature, state class measurement and unit °C with non-numeric value: off
- Support Request - Add Device - Dyson HP07 Purifier Hot and Cool - Device Type 527k HOT 12
- No Formaldehyde Value HOT 2
- New device type Dyson purifier cool formaldehyde HOT 4
- New actively maintained integration! Collaborators welcome! Details inside. HOT 8
- Wifi-less "Dyson Pure Humidity+Cool" is not supported
- state class measurement and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: off HOT 4
- Failed to find the device using discovery
- Not working on Home Assistant v2023.6 HOT 1
- ha-dyson failing with "cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson'" HOT 3
- Oscillation/angle setting
- Deactivate preset mode, or preset mode none
- Planned deprecation of direction, oscillate, preset_mode and set_speed HOT 1
- Local integration stopped working in HA 2024.1 HOT 4
- Depreciation warning in logs HOT 1
- ValueError: invalid literal for int() with base 10: 'off'
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 ha-dyson.