Skip to content

Commit

Permalink
Add ERV type to button component
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunglung committed Sep 26, 2024
1 parent d57527f commit d0b3ee5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
10 changes: 10 additions & 0 deletions components/taixia/button/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
CONF_AIR_CONDITIONER,
CONF_AIRPURIFIER,
CONF_ELECTRIC_FAN,
CONF_ERV,
CONF_DEHUMIDIFIER,
CONF_SUPPORTED_SA
)
Expand Down Expand Up @@ -41,6 +42,10 @@
CONF_FILTER_CLEAN: 0x05
}

ERV_TYPES = {
CONF_FILTER_CLEAN: 0x14,
}

COMMON_TYPES = {
CONF_GET_INFO: 0x00
}
Expand Down Expand Up @@ -97,6 +102,11 @@ async def to_code(config):
for sa_type, service_id in AIRPURIFIER_TYPES.items():
await add_button(config, sa_type, service_id, sa_id)

if config[CONF_TYPE] == CONF_ERV:
sa_id = 14
for sa_type, service_id in ERV_TYPES.items():
await add_button(config, sa_type, service_id, sa_id)

if config[CONF_TYPE] == CONF_ELECTRIC_FAN:
sa_id = 15
for sa_type, service_id in FAN_TYPES.items():
Expand Down
21 changes: 9 additions & 12 deletions examples/Hitachi/erv/erv-taiseia-faikin-s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,19 @@ esp32:
version: 2.0.6

external_components:
- source:
type: local
path: custom_components


#packages:
# esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
- source: github://tsunglung/taixia@master
components: [ taixia ]

wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${devicename}
password: "12345678"

captive_portal:

# Enable logging
logger:
baud_rate: 0 # disable serial logging;
Expand All @@ -49,8 +45,9 @@ logger:
api:

ota:
- platform: esphome

web_server:
# web_server:

uart:
id: uart_taixia
Expand Down Expand Up @@ -186,4 +183,4 @@ taixia:

time:
- platform: homeassistant
id: homeassistant_time
id: homeassistant_time

0 comments on commit d0b3ee5

Please sign in to comment.