Skip to content

Support for pi4ioe5v9xxxx I2C IO expanders#28847

Merged
bdraco merged 51 commits into
home-assistant:devfrom
antonverburg:dev
Apr 7, 2020
Merged

Support for pi4ioe5v9xxxx I2C IO expanders#28847
bdraco merged 51 commits into
home-assistant:devfrom
antonverburg:dev

Conversation

@antonverburg
Copy link
Copy Markdown
Contributor

@antonverburg antonverburg commented Nov 18, 2019

Description:

Added support for pi4ioe5v9xxxx I2C IO expanders

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#11220

Example entry for configuration.yaml (if applicable):

switch:
  - platform: pi4ioe5v9xxxx
    i2c_bus: 1
    invert_logic: True
    pins:
      01: Pin_01/PI0_0
      02: Pin_02/PI0_1
      03: Pin_03/PI0_2
      04: Pin_04/PI0_3
     05: Pin_05/PI0_4

binary_sensor:
 - platform: pi4ioe5v9xxxx
   i2c_bus: 1
   pins:
     01: Pin_01/PI0_0
     02: Pin_02/PI0_1
     03: Pin_03/PI0_2
     04: Pin_04/PI0_3
     05: Pin_05/PI0_4

@homeassistant

This comment has been minimized.

@antonverburg
Copy link
Copy Markdown
Contributor Author

antonverburg commented Nov 18, 2019

Docs now available in pull request home-assistant/home-assistant.io#11220

Comment thread homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py Outdated
Comment thread homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py Outdated
Comment thread homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py Outdated
Comment thread homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py Outdated
Comment thread homeassistant/components/generic_thermostat/climate.py
@michaelarnauts
Copy link
Copy Markdown
Contributor

I can still see 2000+ changes with generic_thermostats changes.

@antonverburg
Copy link
Copy Markdown
Contributor Author

Ok, give me some time. I will fix it...

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Mar 31, 2020

@antonverburg
Copy link
Copy Markdown
Contributor Author

antonverburg commented Mar 31, 2020

Thanks Bdraco, for that info! I will use it for sure in future, but now the problems with thermostat are resolved. I have to fix some other minor issues in the checks, hope to do that tonight. Switch function is already tested and still works. Have to check sensor function still.

@antonverburg
Copy link
Copy Markdown
Contributor Author

antonverburg commented Apr 1, 2020

I just checked also the binary_sensor function. It works, but polling only happens every 30 seconds. I don't use the function myself, and I can imagine that faster is not really required, but in my machine-building experience a response time of 30 seconds is really slow. Is there a config option to increase the polling interval per sensor, or should I add a config parameter for that?


Ah, already found. Adding scan_interval: 1 in the config makes is polling each second.

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 1, 2020

Ah, already found. Adding scan_interval: 1 in the config makes is polling each second.

Do you really need 1s frequency? That is going to create a bit of overhead since this integration isn't async.

@antonverburg
Copy link
Copy Markdown
Contributor Author

Do you really need 1s frequency? That is going to create a bit of overhead since this integration isn't async.

No, I don't need. Actually I don't need the binary_sensor even, but as I was writing the switch it was only a little effort to add the sensor as well. And I was curious if the polling interval can be reduced without writing code. The answer was: yes :)

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 1, 2020

Any more changes coming or ready for another review pass?

@antonverburg
Copy link
Copy Markdown
Contributor Author

Ready for next review.

Copy link
Copy Markdown
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

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

LGTM

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 5, 2020

@antonverburg Looks like this is blocked by the docs requests here: home-assistant/home-assistant.io#11220

Can you get that sorted out so we can merge?

@frenck
Copy link
Copy Markdown
Member

frenck commented Apr 6, 2020

@bdraco A PR on the docs is not blocking the core. Docs can only block a core PR if it is missing.

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 6, 2020

@antonverburg Ready for merge?

@antonverburg
Copy link
Copy Markdown
Contributor Author

Yes. Both in sensor mode & switch mode is tested and works.

Comment thread homeassistant/components/pi4ioe5v9xxxx/switch.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants