Skip to content

Commit

Permalink
Merge branch 'main' into dog-notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed Apr 11, 2024
2 parents ce6cad3 + bf844d8 commit a22bd64
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM homeassistant/home-assistant:2024.3.3@sha256:48773146b3b7f7d4811426a33044a322e8e4fcda97b9ed9a6b37d7e5b649af0b
FROM homeassistant/home-assistant:2024.4.2@sha256:8d107df9537de0ccc3591d8a26fcdb0bb0e73f08b9ca8e83f45a2266ec9dbefc

ARG ENABLE_NONROOT_DOCKER="true"
ARG INSTALL_ZSH="true"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: |
openssl req -x509 -newkey rsa:1024 -subj '/CN=example.com' -nodes -keyout key.pem -out cert.pem
- name: Test config
uses: docker://homeassistant/home-assistant:2024.3.3@sha256:48773146b3b7f7d4811426a33044a322e8e4fcda97b9ed9a6b37d7e5b649af0b
uses: docker://homeassistant/home-assistant:2024.4.2@sha256:8d107df9537de0ccc3591d8a26fcdb0bb0e73f08b9ca8e83f45a2266ec9dbefc
with:
entrypoint: ./script/cibuild
script-deploy:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/plant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async def replace_sensor(call: ServiceCall) -> None:
return

hass.services.async_register(DOMAIN, SERVICE_REPLACE_SENSOR, replace_sensor)
hass.components.websocket_api.async_register_command(ws_get_info)
websocket_api.async_register_command(hass, ws_get_info)
plant.async_schedule_update_ha_state(True)

# Lets add the dummy sensors automatically if we are testing stuff
Expand Down
1 change: 1 addition & 0 deletions custom_components/plant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
ICON_HUMIDITY = "mdi:water-percent"
ICON_ILLUMINANCE = "mdi:brightness-6"
ICON_MOISTURE = "mdi:water"
ICON_PPFD = "mdi:white-balance-sunny"
ICON_TEMPERATURE = "mdi:thermometer"

OPB_GET = "get"
Expand Down
6 changes: 5 additions & 1 deletion custom_components/plant/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@
FLOW_SENSOR_MOISTURE,
FLOW_SENSOR_TEMPERATURE,
ICON_CONDUCTIVITY,
ICON_DLI,
ICON_HUMIDITY,
ICON_ILLUMINANCE,
ICON_MOISTURE,
ICON_PPFD,
ICON_TEMPERATURE,
READING_CONDUCTIVITY,
READING_DLI,
Expand Down Expand Up @@ -449,7 +451,7 @@ def __init__(
self._plant = plantdevice

self._external_sensor = self._plant.sensor_illuminance.entity_id
self._attr_icon = "mdi:white-balance-sunny"
self._attr_icon = ICON_PPFD
super().__init__(hass, config, plantdevice)
self._follow_unit = False
self.entity_id = async_generate_entity_id(
Expand Down Expand Up @@ -538,6 +540,7 @@ def __init__(
unit_time=UnitOfTime.SECONDS,
)
self._unit_of_measurement = UNIT_DLI
self._attr_icon = ICON_DLI
self.entity_id = async_generate_entity_id(
f"{DOMAIN_SENSOR}.{{}}", self.name, current_ids={}
)
Expand Down Expand Up @@ -597,6 +600,7 @@ def __init__(
)

self._unit_of_measurement = UNIT_DLI
self._attr_icon = ICON_DLI
self._plant = plantdevice

@property
Expand Down

0 comments on commit a22bd64

Please sign in to comment.