Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion custom_components/hass_datapoints/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import async_track_time_interval
Expand Down Expand Up @@ -123,6 +123,7 @@ def _cleanup(self) -> None:
def _on_store_update(self) -> None:
self.async_write_ha_state()

@callback
def _on_time_interval(self, now: datetime) -> None:
self.async_write_ha_state()

Expand Down
2 changes: 1 addition & 1 deletion custom_components/hass_datapoints/hass-datapoints-cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -42238,7 +42238,7 @@
].forEach((card) => {
if (!registeredTypes.has(card.type)) window.customCards?.push(card);
});
console.groupCollapsed(`%c hass-datapoints %c v0.5.1 loaded `, "color:#fff;background:#03a9f4;font-weight:bold;padding:2px 6px;border-radius:3px 0 0 3px", "color:#03a9f4;background:#fff;font-weight:bold;padding:2px 6px;border:1px solid #03a9f4;border-radius:0 3px 3px 0", ...[]);
console.groupCollapsed(`%c hass-datapoints %c v0.6.1 loaded `, "color:#fff;background:#03a9f4;font-weight:bold;padding:2px 6px;border-radius:3px 0 0 3px", "color:#03a9f4;background:#fff;font-weight:bold;padding:2px 6px;border:1px solid #03a9f4;border-radius:0 3px 3px 0", ...[]);
console.log("Enable debug logging by setting %cwindow.__HASS_DATAPOINTS_DEV__ = true", "color:#333;background:#eee;border:1px solid #777;padding:2px 6px;border-radius:5px; font-family: Courier");
console.groupEnd();
//#endregion
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hass_datapoints/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/buggedcom/hass-datapoints/issues",
"requirements": [],
"version": "0.5.1"
"version": "0.6.1"
}
4 changes: 3 additions & 1 deletion custom_components/hass_datapoints/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def async_added_to_hass(self) -> None:
self._hass, self._handle_time_interval, _UPDATE_INTERVAL
)
)

@callback
def _handle_time_interval(self, now: datetime) -> None:
"""Refresh state on every timer tick."""
Expand Down Expand Up @@ -651,6 +651,7 @@ def _schedule_timer(self) -> None:
except ValueError:
stagger_secs = 0

@callback
def _start(_now: Any = None) -> None:
self._unsub_stagger = None # stagger has fired; clear reference
self._unsub_timer = async_track_time_interval(
Expand All @@ -665,6 +666,7 @@ def _start(_now: Any = None) -> None:
lambda: self._unsub_stagger and self._unsub_stagger() # type: ignore[func-returns-value]
)

@callback
def _handle_scan_tick(self, now: datetime) -> None:
"""Trigger a scan on the next event loop iteration."""
coroutine = self._run_scan()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hass-datapoints",
"version": "0.5.1",
"version": "0.6.1",
"private": true,
"description": "Build and development entrypoints for the hass-datapoints Home Assistant integration.",
"packageManager": "pnpm@10.33.0",
Expand Down
Loading