1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-17 07:34:21 +01:00
Files
frontend/src/data/datetime.ts
Wendelin 830d8d2410 Add type import check to eslint (#22488)
* Add type import check to eslint

* Add type imports with eslint --fix
2024-10-30 11:12:30 +00:00

13 lines
267 B
TypeScript

import type { HomeAssistant } from "../types";
export const setDateTimeValue = (
hass: HomeAssistant,
entityId: string,
datetime: Date
) => {
hass.callService("datetime", "set_value", {
entity_id: entityId,
datetime: datetime.toISOString(),
});
};