Skip to content

Commit

Permalink
more actions added
Browse files Browse the repository at this point in the history
Custom EZO command action.
I2C address change (not tested).
  • Loading branch information
TheRealFalseReality committed Feb 5, 2025
1 parent e10d682 commit cba184e
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 14 deletions.
15 changes: 15 additions & 0 deletions common/ezo_co2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ interval:
then:
- button.press: read_co2

api:
actions:
- action: co2_change_address
variables:
address: int
then:
- lambda: |-
id(co2_ezo).send_custom("I2C,{{address}}");
- action: co2_custom_command
variables:
command: string
then:
- lambda: |-
id(co2_ezo).send_custom({{command}});
sensor:
# EZO Circuits (SCL/RX, SDA/TX)
# EZO Circuit - CO2
Expand Down
12 changes: 12 additions & 0 deletions common/ezo_do.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ web_server:

api:
actions:
- action: do_change_address
variables:
address: int
then:
- lambda: |-
id(do_ezo).send_custom("I2C,{{address}}");
- action: do_custom_command
variables:
command: string
then:
- lambda: |-
id(do_ezo).send_custom({{command}});
- action: do_read_continous
then:
- repeat:
Expand Down
12 changes: 12 additions & 0 deletions common/ezo_ec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ web_server:

api:
actions:
- action: ec_change_address
variables:
address: int
then:
- lambda: |-
id(ec_ezo).send_custom("I2C,{{address}}");
- action: ec_custom_command
variables:
command: string
then:
- lambda: |-
id(ec_ezo).send_custom({{command}});
- action: ec_read_continous
then:
- repeat:
Expand Down
15 changes: 15 additions & 0 deletions common/ezo_hum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ interval:
then:
- button.press: read_hum

api:
actions:
- action: hum_change_address
variables:
address: int
then:
- lambda: |-
id(hum_ezo).send_custom("I2C,{{address}}");
- action: hum_custom_command
variables:
command: string
then:
- lambda: |-
id(hum_ezo).send_custom({{command}});
sensor:
# EZO Circuits (SCL/RX, SDA/TX)
# EZO Circuit - HUM
Expand Down
25 changes: 12 additions & 13 deletions common/ezo_orp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ web_server:

api:
actions:
- action: orp_change_address
variables:
address: int
then:
- lambda: |-
id(orp_ezo).send_custom("I2C,{{address}}");
- action: orp_custom_command
variables:
command: string
then:
- lambda: |-
id(orp_ezo).send_custom({{command}});
- action: orp_read_continous
then:
- repeat:
Expand All @@ -24,19 +36,6 @@ api:
then:
- lambda: |-
id(orp_ezo).send_custom("Cal,225");
# - action: orp_calibrate_custom
# variables:
# value: int
# then:
# - lambda: |-
# id(orp_ezo).send_custom(Cal,value);
# - action: ezo_orp_custom_command
# variables:
# command: string
# then:
# - lambda: |-
# id(orp_ezo).send_custom(command);

esphome:
on_boot:
priority: 800
Expand Down
14 changes: 13 additions & 1 deletion common/ezo_ph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ web_server:
- id: sorting_group_ph
name: "pH - EZO"
sorting_weight: ${sorting_group_ph}

api:
actions:
- action: ph_change_address
variables:
address: int
then:
- lambda: |-
id(ph_ezo).send_custom("I2C,{{address}}");
- action: ph_custom_command
variables:
command: string
then:
- lambda: |-
id(ph_ezo).send_custom({{command}});
- action: ph_read_continous
then:
- repeat:
Expand Down
15 changes: 15 additions & 0 deletions common/ezo_rtd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ web_server:
# then:
# - button.press: send_selected_rtd

api:
actions:
- action: temperature_rtd_change_address
variables:
address: int
then:
- lambda: |-
id(temp_ezo).send_custom("I2C,{{address}}");
- action: temperature_rtd_custom_command
variables:
command: string
then:
- lambda: |-
id(temp_ezo).send_custom({{command}});
sensor:
# EZO Circuits (yellow - SCL/RX, blue - SDA/TX)
# EZO Circuit - RTD
Expand Down

0 comments on commit cba184e

Please sign in to comment.