Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #30 from ryanwinter/patch
Browse files Browse the repository at this point in the history
fix error if keys dont exist
  • Loading branch information
ryanwinter authored Feb 27, 2023
2 parents 600fc50 + 3f2f614 commit 547df36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/rainforest_emu_2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(
self._current_usage = None
self._current_usage_start_date = dt.utc_from_timestamp(0)

self._emu2 = Emu2(properties[ATTR_DEVICE_PATH], properties[CONF_HOST], properties[CONF_PORT])
self._emu2 = Emu2(properties.get(ATTR_DEVICE_PATH, ""), properties.get(CONF_HOST, ""), properties.get(CONF_PORT, 0))
self._emu2.register_process_callback(self._process_update)

self._serial_loop_task = self._hass.loop.create_task(self._emu2.serial_read())
Expand Down
2 changes: 1 addition & 1 deletion custom_components/rainforest_emu_2/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"pyserial-asyncio==0.6"
],
"iot_class": "local_polling",
"version": "1.3.1",
"version": "1.3.2",
"config_flow": true,
"usb": [
{
Expand Down

0 comments on commit 547df36

Please sign in to comment.