找回密码
 立即注册
搜索
查看: 7998|回复: 1

[求助] 8266+PCF8574扩IO出错

[复制链接]

75

主题

546

回帖

3614

积分

论坛元老

积分
3614
金钱
2993
HASS币
0
发表于 2020-6-27 11:31:51 | 显示全部楼层 |阅读模式
https://esphome.io/components/pcf8574.html
通信出错。
请教下如何写配置。 或更好的方案。
回复

使用道具 举报

2

主题

40

回帖

621

积分

高级会员

积分
621
金钱
579
HASS币
0
发表于 2025-1-15 18:06:24 | 显示全部楼层
本帖最后由 pnjycn 于 2025-1-15 18:07 编辑
i2c:          
 - id: bus_a
   sda: D3  
   scl: D4 
   scan: True
   
pcf8574:
  - id: 'pcf8574_hub'
    address: 0x27
    i2c_id: bus_a
    pcf8575: true

 
binary_sensor:   #增加按钮
  - platform: gpio
    internal: true  #是否对外隐藏(是.true/否false)
    pin:
     pcf8574: pcf8574_hub
     number: 10
     inverted: false  #反转二进制开关输出显示(是.true/否false)
     mode:
      output: true
    name: "增加"
    icon: mdi:chevron-up-circle
    device_class: opening
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-6-30 06:10 , Processed in 0.456634 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表