Code Monkey home page Code Monkey logo

home-assistant-custom-components-switch-humidifier's People

Contributors

adrianbyv avatar alextircovnicu avatar auspic7 avatar joshuata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

home-assistant-custom-components-switch-humidifier's Issues

AttributeError: 'NoneType' object has no attribute 'state'

Hello, I can't turn on or off the switch via humidifier entity. There is the log if home assistant:

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/config/custom_components/switch_humidifier/humidifier.py", line 208, in _state_changed
    if not new_state is None and not new_state.state == 'unknown' and not new_state.state == 'unavailable' and not old_state.state == new_state.state:
                                                                                                                   ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

There is my config code:

humidifier: 
  - platform: switch_humidifier
    name: Humidifier
    switch_id: switch.sonoff_10017a2176
    sensor_id: sensor.temp1_humidity
    type: humidifier
    start_delta: 0.2
    stop_delta: 0.2

Can you help me, please? Thanks!

Humidifier entity will turn off by itself

image

It seems like to work properly but has a problem... When the sensor value reaches target humidity, it turns off the smart plug successfully, and it will turn off by itself in few seconds.

I know there's already a logic handles internal state change. But I still don't know why this won't work.

if self._self_changed_switch == True:
# Platform fired the switch state change
self._self_changed_switch = False
else:
# Switch state changed by external source
new_is_on = self._switch_state == STATE_ON
if not new_is_on == self._is_on:
self._is_on = new_is_on
# Update state of entity
self.async_write_ha_state()
self._update_switch()

Why is this better than generic_hygrostat?

You can already copy+paste the generic_hygrostat component's pending PR, which seems more official, and once it's added you only have to delete custom_components/generic_hygrostat because config stays the same. Is there any better features in this?

Automatically add homekit attribute

It would be nice to automatically add the linked_humidity_sensor attribute to the homekit config, especially since it can't be done if HomeKit is configured using the frontend. I am looking into whether this can be done currently, but it might require changes to HomeAssistant Core

Version key missing

Just a friendly heads up, started noticing this message in my logs:

No 'version' key in the manifest file for custom integration 'switch_humidifier'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'switch_humidifier'

Add humidity delta to reduce power cycling

It would be nice to expose a setting for a delta that would be added to the desired humidity level so that there is no chance the system will turn the switch on and off repeatedly. A default of 0.2 percent would probably be enough, it would just require waiting to turn off the system until it reached goal + delta, and then letting it drift until it dropped below (or above) the delta percentage again.

Entity loses status on system restart

When I restart Homeassistant the thermostat resets the desired humidity level to the default of 50. The expected behavior is to retain the last user setting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.