From 907f2724730196cb21934074b9afd8076eef296d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:38:50 +1300 Subject: [PATCH 1/4] Add module configs for grove port / m5tack-env-iv sensor --- modules/grove-i2c.yaml | 9 +++++++++ modules/m5stack-env-iv.yaml | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 modules/grove-i2c.yaml create mode 100644 modules/m5stack-env-iv.yaml diff --git a/modules/grove-i2c.yaml b/modules/grove-i2c.yaml new file mode 100644 index 00000000..f6972562 --- /dev/null +++ b/modules/grove-i2c.yaml @@ -0,0 +1,9 @@ +i2c: + - id: grove_i2c + sda: GPIO1 + scl: GPIO2 + +switch: + - id: !extend grove_port_power + restore_mode: ALWAYS_ON + setup_priority: 1001 diff --git a/modules/m5stack-env-iv.yaml b/modules/m5stack-env-iv.yaml new file mode 100644 index 00000000..282903b9 --- /dev/null +++ b/modules/m5stack-env-iv.yaml @@ -0,0 +1,15 @@ +sensor: + - platform: sht4x + i2c_id: grove_i2c + temperature: + name: Temperature + humidity: + name: Humidity + + - platform: bmp280_i2c + i2c_id: grove_i2c + address: 0x76 + temperature: + name: Temperature 2 + pressure: + name: Pressure From 21fde6e689377fbb3d6b2c2639e13418d2f9e2bf Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:54:04 +1300 Subject: [PATCH 2/4] Remove env-iv from repo Move grove power switch to grove yaml --- home-assistant-voice.yaml | 5 ----- modules/grove-i2c.yaml | 6 ++++-- modules/m5stack-env-iv.yaml | 15 --------------- 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 modules/m5stack-env-iv.yaml diff --git a/home-assistant-voice.yaml b/home-assistant-voice.yaml index fff5acaf..e060b3ca 100644 --- a/home-assistant-voice.yaml +++ b/home-assistant-voice.yaml @@ -258,11 +258,6 @@ switch: entity_category: config restore_mode: ALWAYS_OFF internal: true - - platform: gpio - pin: GPIO46 - id: grove_port_power - # Change this to ALWAYS_ON if you are planning to use the Grove port - restore_mode: RESTORE_DEFAULT_OFF binary_sensor: # Center Button. Used for many things (See on_multi_click) diff --git a/modules/grove-i2c.yaml b/modules/grove-i2c.yaml index f6972562..7dc77503 100644 --- a/modules/grove-i2c.yaml +++ b/modules/grove-i2c.yaml @@ -4,6 +4,8 @@ i2c: scl: GPIO2 switch: - - id: !extend grove_port_power + - platform: gpio + pin: GPIO46 + id: grove_port_power restore_mode: ALWAYS_ON - setup_priority: 1001 + setup_priority: 1001 # This sets the pin to be on before the i2c scan happens (priority 1000) diff --git a/modules/m5stack-env-iv.yaml b/modules/m5stack-env-iv.yaml deleted file mode 100644 index 282903b9..00000000 --- a/modules/m5stack-env-iv.yaml +++ /dev/null @@ -1,15 +0,0 @@ -sensor: - - platform: sht4x - i2c_id: grove_i2c - temperature: - name: Temperature - humidity: - name: Humidity - - - platform: bmp280_i2c - i2c_id: grove_i2c - address: 0x76 - temperature: - name: Temperature 2 - pressure: - name: Pressure From 061be40856904dcd57252c2b5b70bfa7bebb3422 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:54:52 +1300 Subject: [PATCH 3/4] yamllint --- modules/grove-i2c.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/grove-i2c.yaml b/modules/grove-i2c.yaml index 7dc77503..728afdc2 100644 --- a/modules/grove-i2c.yaml +++ b/modules/grove-i2c.yaml @@ -8,4 +8,4 @@ switch: pin: GPIO46 id: grove_port_power restore_mode: ALWAYS_ON - setup_priority: 1001 # This sets the pin to be on before the i2c scan happens (priority 1000) + setup_priority: 1001 # This sets the pin to be on before the i2c scan happens (priority 1000) From 61572d7088f195118f5d56eb17cc3c0df4c43de1 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:28:10 +1300 Subject: [PATCH 4/4] Add grove power module for when you dont want i2c --- modules/grove-power.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 modules/grove-power.yaml diff --git a/modules/grove-power.yaml b/modules/grove-power.yaml new file mode 100644 index 00000000..181bd9f1 --- /dev/null +++ b/modules/grove-power.yaml @@ -0,0 +1,6 @@ +switch: + - platform: gpio + pin: GPIO46 + id: grove_port_power + restore_mode: ALWAYS_ON + setup_priority: 1001 # This sets the pin to be on before the i2c scan happens (priority 1000)