rebrand to sleepd, remove next alarm sensor

This commit is contained in:
sudoxnym 2025-12-07 08:04:02 -06:00
parent 0cbe7ba589
commit 7b62009e0d
28 changed files with 2996 additions and 3111 deletions

View file

@ -1,4 +1,4 @@
# Contributing to SAAS - Sleep As Android Status # Contributing to sleepd - Sleep As Android Status
Thanks for helping improve the project! Thanks for helping improve the project!

View file

@ -1,4 +1,4 @@
# 🧪 Deploying SAAS - Sleep As Android Status via HACS # 🧪 Deploying sleepd - Sleep As Android Status via HACS
## 🛠️ Pre-requisites ## 🛠️ Pre-requisites
@ -11,12 +11,12 @@
1. In HACS, go to "Integrations" 1. In HACS, go to "Integrations"
2. Click the 3-dot menu > Custom repositories 2. Click the 3-dot menu > Custom repositories
3. Paste: `https://github.com/sudoxnym/saas` 3. Paste: `https://github.com/sudoxnym/sleepd`
4. Set Category to "Integration" 4. Set Category to "Integration"
5. Click "Add" 5. Click "Add"
6. Refresh, search for `SAAS - Sleep As Android Status`, and install 6. Refresh, search for `sleepd - Sleep As Android Status`, and install
7. Restart Home Assistant 7. Restart Home Assistant
8. Go to Settings > Devices & Services > Add Integration > search "SAAS" 8. Go to Settings > Devices & Services > Add Integration > search "sleepd"
9. Configure the integration with your MQTT topic and states 9. Configure the integration with your MQTT topic and states
## 🧪 Testing ## 🧪 Testing

View file

@ -4,10 +4,10 @@
</a> </a>
</p> </p>
<h1>🌙 saas - Sleep As Android status</h1> <h1>🌙 sleepd - Sleep As Android status</h1>
<h2>🚨 0.2.0 breaking changes 🚨</h2> <h2>🚨 0.2.0 breaking changes 🚨</h2>
due to changes in **Home Assistant** 2025.12, you **must** remove your existing **SAAS** integration entries and re-add them after updating to this version. due to changes in **Home Assistant** 2025.12, you **must** remove your existing **sleepd** integration entries and re-add them after updating to this version.
--- ---
@ -21,7 +21,7 @@ sleep as android status is my solution for wake/sleep state within HA. it listen
<ul> <ul>
<li> <li>
<details> <details>
<summary><strong>📡 9 sensors</strong></summary> <summary><strong>📡 8 sensors</strong></summary>
| Sensor | Description | | Sensor | Description |
| ------ | ----------- | | ------ | ----------- |
@ -57,7 +57,7 @@ sleep as android status is my solution for wake/sleep state within HA. it listen
<details> <details>
<summary><strong>🛠️ 1 service</strong></summary> <summary><strong>🛠️ 1 service</strong></summary>
<pre> <pre>
service: saas.saas_example_alarm_set service: sleepd.sleepd_example_alarm_set
data: data:
message: Example Message! message: Example Message!
day: monday day: monday
@ -86,15 +86,15 @@ data:
<h2>🧪 installation:</h2> <h2>🧪 installation:</h2>
<ul> <ul>
<li>add <code>https://www.github.com/sudoxnym/saas</code> to your custom repositories in HACS</li> <li>add <code>https://www.github.com/sudoxnym/sleepd</code> to your custom repositories in HACS</li>
<li>search and download **SAAS - Sleep As Android status**</li> <li>search and download **sleepd - Sleep As Android status**</li>
<li>restart Home Assistant</li> <li>restart Home Assistant</li>
<li> <li>
<a href="https://my.home-assistant.io/redirect/config_flow_start/?domain=saas"> <a href="https://my.home-assistant.io/redirect/config_flow_start/?domain=sleepd">
<img src="https://my.home-assistant.io/badges/config_flow_start.svg" alt="add to ha"> <img src="https://my.home-assistant.io/badges/config_flow_start.svg" alt="add to ha">
</a> </a>
</li> </li>
<li>add integration: **SAAS - Sleep As Android status**</li> <li>add integration: **sleepd - Sleep As Android status**</li>
</ul> </ul>
<h2>⚙️ configuration:</h2> <h2>⚙️ configuration:</h2>

View file

@ -1,10 +0,0 @@
{
"domain": "saas",
"name": "SAAS - Sleep As Android Status",
"codeowners": ["@sudoxnym"],
"config_flow": true,
"dependencies": ["mqtt", "mobile_app"],
"documentation": "https://www.github.com/sudoxnym/saas",
"issue_tracker": "https://www.github.com/sudoxnym/saas/issues",
"version": "0.2.1"
}

View file

@ -8,8 +8,8 @@ from .services import async_setup_services # Import the service setup function
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup(hass: HomeAssistant, config: dict) -> bool: async def async_setup(hass: HomeAssistant, config: dict) -> bool:
"""Set up the SAAS - Sleep As Android Status component.""" """Set up the sleepd - Sleep As Android Status component."""
_LOGGER.info("Starting setup of the SAAS component") _LOGGER.info("Starting setup of the sleepd component")
return True return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
@ -46,7 +46,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# unload sensor and button platforms # unload sensor and button platforms
unload_ok = await hass.config_entries.async_unload_platforms(entry, ["sensor", "button"]) unload_ok = await hass.config_entries.async_unload_platforms(entry, ["sensor", "button"])
if not unload_ok: if not unload_ok:
_LOGGER.error("Failed to unload platforms for saas") _LOGGER.error("Failed to unload platforms for sleepd")
return False return False
# clean up our stored data # clean up our stored data

View file

@ -7,10 +7,10 @@ import asyncio
# Set up logging # Set up logging
# _LOGGER = logging.getLogger(__name__) # _LOGGER = logging.getLogger(__name__)
class SAASSleepTrackingStart(ButtonEntity): class sleepdSleepTrackingStart(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Sleep Tracking Start button with name: %s", name) # _LOGGER.debug("Initializing sleepd Sleep Tracking Start button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target # Store notify_target as an instance variable self._notify_target = notify_target # Store notify_target as an instance variable
@ -20,14 +20,14 @@ class SAASSleepTrackingStart(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_sleep_tracking_start_{self._name}" unique_id = f"sleepd_sleep_tracking_start_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Sleep Tracking Start" name = f"sleepd {self._name} Sleep Tracking Start"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -80,10 +80,10 @@ class SAASSleepTrackingStart(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASSleepTrackingStop(ButtonEntity): class sleepdSleepTrackingStop(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Sleep Tracking Stop button with name: %s", name) # _LOGGER.debug("Initializing sleepd Sleep Tracking Stop button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -93,14 +93,14 @@ class SAASSleepTrackingStop(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_sleep_tracking_stop_{self._name}" unique_id = f"sleepd_sleep_tracking_stop_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Sleep Tracking Stop" name = f"sleepd {self._name} Sleep Tracking Stop"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -153,10 +153,10 @@ class SAASSleepTrackingStop(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASSleepTrackingPause(ButtonEntity): class sleepdSleepTrackingPause(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Sleep Tracking Pause button with name: %s", name) # _LOGGER.debug("Initializing sleepd Sleep Tracking Pause button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -166,14 +166,14 @@ class SAASSleepTrackingPause(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_sleep_tracking_pause_{self._name}" unique_id = f"sleepd_sleep_tracking_pause_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Sleep Tracking Pause" name = f"sleepd {self._name} Sleep Tracking Pause"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -226,10 +226,10 @@ class SAASSleepTrackingPause(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASSleepTrackingResume(ButtonEntity): class sleepdSleepTrackingResume(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Sleep Tracking Pause button with name: %s", name) # _LOGGER.debug("Initializing sleepd Sleep Tracking Pause button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -239,14 +239,14 @@ class SAASSleepTrackingResume(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_sleep_tracking_resume_{self._name}" unique_id = f"sleepd_sleep_tracking_resume_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Sleep Tracking Resume" name = f"sleepd {self._name} Sleep Tracking Resume"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -299,10 +299,10 @@ class SAASSleepTrackingResume(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASAlarmClockSnooze(ButtonEntity): class sleepdAlarmClockSnooze(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Alarm Clock Snooze button with name: %s", name) # _LOGGER.debug("Initializing sleepd Alarm Clock Snooze button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -312,14 +312,14 @@ class SAASAlarmClockSnooze(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_alarm_clock_snooze_{self._name}" unique_id = f"sleepd_alarm_clock_snooze_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Alarm Clock Snooze" name = f"sleepd {self._name} Alarm Clock Snooze"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -372,10 +372,10 @@ class SAASAlarmClockSnooze(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASAlarmClockDisable(ButtonEntity): class sleepdAlarmClockDisable(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Alarm Clock Disable button with name: %s", name) # _LOGGER.debug("Initializing sleepd Alarm Clock Disable button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -385,14 +385,14 @@ class SAASAlarmClockDisable(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_alarm_clock_disable_{self._name}" unique_id = f"sleepd_alarm_clock_disable_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Alarm Clock Disable" name = f"sleepd {self._name} Alarm Clock Disable"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -445,10 +445,10 @@ class SAASAlarmClockDisable(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASSleepTrackingStartWithAlarm(ButtonEntity): class sleepdSleepTrackingStartWithAlarm(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Sleep Tracking Start with Alarm button with name: %s", name) # _LOGGER.debug("Initializing sleepd Sleep Tracking Start with Alarm button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -458,14 +458,14 @@ class SAASSleepTrackingStartWithAlarm(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_sleep_tracking_start_with_alarm_{self._name}" unique_id = f"sleepd_sleep_tracking_start_with_alarm_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Sleep Tracking Start with Alarm" name = f"sleepd {self._name} Sleep Tracking Start with Alarm"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -518,10 +518,10 @@ class SAASSleepTrackingStartWithAlarm(ButtonEntity):
self.schedule_update_ha_state() self.schedule_update_ha_state()
# _LOGGER.debug("Button pressed. Current state: %s", self._state) # _LOGGER.debug("Button pressed. Current state: %s", self._state)
class SAASLullabyStop(ButtonEntity): class sleepdLullabyStop(ButtonEntity):
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
"""Initialize the button.""" """Initialize the button."""
# _LOGGER.debug("Initializing SAAS Lullaby Stop button with name: %s", name) # _LOGGER.debug("Initializing sleepd Lullaby Stop button with name: %s", name)
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
@ -531,14 +531,14 @@ class SAASLullabyStop(ButtonEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
unique_id = f"saas_lullaby_stop_{self._name}" unique_id = f"sleepd_lullaby_stop_{self._name}"
# _LOGGER.debug("Getting unique ID for the button: %s", unique_id) # _LOGGER.debug("Getting unique ID for the button: %s", unique_id)
return unique_id return unique_id
@property @property
def name(self): def name(self):
"""Return the name of the button.""" """Return the name of the button."""
name = f"SAAS {self._name} Lullaby Stop" name = f"sleepd {self._name} Lullaby Stop"
# _LOGGER.debug("Getting name of the button: %s", name) # _LOGGER.debug("Getting name of the button: %s", name)
return name return name
@ -598,22 +598,22 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
if not notify_target: if not notify_target:
_LOGGER.warning("no notify_target configured; skipping button setup") _LOGGER.warning("no notify_target configured; skipping button setup")
return return
# _LOGGER.debug("Setting up SAAS Sleep Tracking buttons from a config entry with data: %s", config_entry.data) # _LOGGER.debug("Setting up sleepd Sleep Tracking buttons from a config entry with data: %s", config_entry.data)
# Extract the necessary data from config_entry.data # Extract the necessary data from config_entry.data
name = config_entry.data[CONF_NAME] name = config_entry.data[CONF_NAME]
notify_target = config_entry.data.get(CONF_NOTIFY_TARGET) notify_target = config_entry.data.get(CONF_NOTIFY_TARGET)
# Create instances of SAASSleepTrackingStart, SAASSleepTrackingStop and SAASSleepTrackingPause # Create instances of sleepdSleepTrackingStart, sleepdSleepTrackingStop and sleepdSleepTrackingPause
entities = [ entities = [
SAASSleepTrackingStart(hass, name, notify_target), sleepdSleepTrackingStart(hass, name, notify_target),
SAASSleepTrackingStop(hass, name, notify_target), sleepdSleepTrackingStop(hass, name, notify_target),
SAASSleepTrackingPause(hass, name, notify_target), sleepdSleepTrackingPause(hass, name, notify_target),
SAASSleepTrackingResume(hass, name, notify_target), sleepdSleepTrackingResume(hass, name, notify_target),
SAASAlarmClockSnooze(hass, name, notify_target), sleepdAlarmClockSnooze(hass, name, notify_target),
SAASAlarmClockDisable(hass, name, notify_target), sleepdAlarmClockDisable(hass, name, notify_target),
SAASSleepTrackingStartWithAlarm(hass, name, notify_target), sleepdSleepTrackingStartWithAlarm(hass, name, notify_target),
SAASLullabyStop(hass, name, notify_target), sleepdLullabyStop(hass, name, notify_target),
] ]
# Call async_setup on each entity if it has that method # Call async_setup on each entity if it has that method
@ -623,4 +623,4 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
# Add the entities # Add the entities
async_add_entities(entities) async_add_entities(entities)
# _LOGGER.debug("SAAS Sleep Tracking buttons set up successfully") # _LOGGER.debug("sleepd Sleep Tracking buttons set up successfully")

View file

@ -23,7 +23,7 @@ _LOGGER = logging.getLogger(__name__)
class MyConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class MyConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle the initial config flow for SAAS.""" """Handle the initial config flow for sleepd."""
VERSION = 2 VERSION = 2
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
@ -90,7 +90,7 @@ class MyConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
class OptionsFlowHandler(config_entries.OptionsFlow): class OptionsFlowHandler(config_entries.OptionsFlow):
"""Handle SAAS options editing.""" """Handle sleepd options editing."""
def __init__(self, entry): def __init__(self, entry):
super().__init__() super().__init__()

View file

@ -1,9 +1,9 @@
"""Constants for the SAAS - Sleep As Android Stats integration.""" """Constants for the sleepd - Sleep As Android Stats integration."""
DOMAIN = "saas" DOMAIN = "sleepd"
INTEGRATION_NAME = "SAAS - Sleep As Android Stats" INTEGRATION_NAME = "sleepd - Sleep As Android Stats"
MODEL = "SAAS - Version 0.0.1" MODEL = "sleepd - Version 0.0.1"
CONF_NAME = "name" # Name of the Integration CONF_NAME = "name" # Name of the Integration
CONF_TOPIC = "topic_template" # MQTT Topic for Sleep As Android Events CONF_TOPIC = "topic_template" # MQTT Topic for Sleep As Android Events

View file

@ -0,0 +1,10 @@
{
"domain": "sleepd",
"name": "sleepd - Sleep As Android Status",
"codeowners": ["@sudoxnym"],
"config_flow": true,
"dependencies": ["mqtt", "mobile_app"],
"documentation": "https://www.github.com/sudoxnym/sleepd",
"issue_tracker": "https://www.github.com/sudoxnym/sleepd/issues",
"version": "0.2.1"
}

View file

@ -13,8 +13,8 @@ from .const import DOMAIN, CONF_NAME, CONF_TOPIC, CONF_AWAKE_STATES, CONF_SLEEP_
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
_LOGGER.setLevel(logging.DEBUG) _LOGGER.setLevel(logging.DEBUG)
class SAASSensor(RestoreEntity): class sleepdSensor(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor.""" """Representation of a sleepd - Sleep As Android Stats sensor."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
@ -27,12 +27,12 @@ class SAASSensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_sensor_{self._name}" return f"sleepd_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} State" return f"sleepd {self._name} State"
@property @property
def state(self): def state(self):
@ -88,8 +88,8 @@ class SAASSensor(RestoreEntity):
self._hass.states.async_set(self.entity_id, self._state) self._hass.states.async_set(self.entity_id, self._state)
_LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}") _LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}")
class SAASAlarmEventSensor(RestoreEntity): class sleepdAlarmEventSensor(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor for Alarm Events.""" """Representation of a sleepd - Sleep As Android Stats sensor for Alarm Events."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
@ -107,12 +107,12 @@ class SAASAlarmEventSensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_alarm_event_sensor_{self._name}" return f"sleepd_alarm_event_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Alarm Event" return f"sleepd {self._name} Alarm Event"
@property @property
def state(self): def state(self):
@ -219,122 +219,8 @@ class SAASAlarmEventSensor(RestoreEntity):
_LOGGER.debug(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Set state to 'None' due to timeout for sensor {self.name}") _LOGGER.debug(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Set state to 'None' due to timeout for sensor {self.name}")
self.async_schedule_update_ha_state() self.async_schedule_update_ha_state()
class SAASNextAlarmSensor(RestoreEntity): class sleepdSoundSensor(RestoreEntity):
"""Sensor that exposes the next scheduled alarm time and label.""" """Representation of a sleepd - Sleep As Android Stats sensor for Sound Events."""
def __init__(self, hass, name, entry_id):
self._hass = hass
self._name = name
self.entry_id = entry_id
self._state = None
self._label = None
self._alarms = []
@property
def unique_id(self):
return f"saas_next_alarm_{self._name}"
@property
def name(self):
return f"SAAS {self._name} Next Alarm"
@property
def state(self):
return self._state
@property
def device_info(self):
"""Return information about the device."""
return {
"identifiers": {(DOMAIN, self._name)},
"name": self._name,
"manufacturer": INTEGRATION_NAME,
"model": MODEL,
}
@property
def extra_state_attributes(self):
attrs = {}
if self._label:
attrs["Label"] = self._label
if self._alarms:
attrs["Alarms"] = self._alarms
return attrs
async def async_added_to_hass(self):
await super().async_added_to_hass()
state = await self.async_get_last_state()
if state:
self._state = state.state if state.state != "None" else None
self._label = state.attributes.get("Label")
saved = state.attributes.get("Alarms")
if isinstance(saved, list):
self._alarms = saved
async def message_received(msg):
msg_json = json.loads(msg.payload)
event = msg_json.get("event")
value1 = msg_json.get("value1")
value2 = msg_json.get("value2")
if event == "alarm_rescheduled":
if value1:
ts = int(value1) / 1000.0
dt = dt_util.as_local(datetime.fromtimestamp(ts))
epoch = dt.timestamp()
found = False
for alarm in self._alarms:
if alarm["timestamp"] == epoch:
alarm["label"] = value2
found = True
break
if not found:
self._alarms.append({"timestamp": epoch, "label": value2})
self._alarms.sort(key=lambda x: x["timestamp"])
self._alarms = self._alarms[:10]
elif event in ("alarm_alert_dismiss", "alarm_skip_next"):
if value1:
ts = int(value1) / 1000.0
dt = dt_util.as_local(datetime.fromtimestamp(ts))
epoch = dt.timestamp()
self._alarms = [a for a in self._alarms if a["timestamp"] != epoch]
elif self._alarms:
self._alarms.pop(0)
else:
return
if self._alarms:
next_alarm = self._alarms[0]
dt = dt_util.as_local(datetime.fromtimestamp(next_alarm["timestamp"]))
self._state = dt.strftime("%Y-%m-%d %H:%M")
self._label = next_alarm.get("label")
else:
self._state = None
self._label = None
self.async_schedule_update_ha_state()
await async_subscribe(
self._hass,
self._hass.data[DOMAIN][self.entry_id][CONF_TOPIC],
message_received,
)
async def async_will_remove_from_hass(self):
"""Run when entity will be removed from hass."""
self.hass.states.async_set(
self.entity_id,
self._state,
{"Label": self._label, "Alarms": self._alarms},
)
_LOGGER.info(
f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}"
)
class SAASSoundSensor(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor for Sound Events."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
@ -352,12 +238,12 @@ class SAASSoundSensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_sound_sensor_{self._name}" return f"sleepd_sound_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Sound" return f"sleepd {self._name} Sound"
@property @property
def state(self): def state(self):
@ -462,8 +348,8 @@ class SAASSoundSensor(RestoreEntity):
_LOGGER.debug(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Set state to 'None' due to timeout for sensor {self.name}") _LOGGER.debug(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Set state to 'None' due to timeout for sensor {self.name}")
self.async_schedule_update_ha_state() self.async_schedule_update_ha_state()
class SAASSleepTrackingSensor(RestoreEntity): class sleepdSleepTrackingSensor(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor for Sleep Tracking.""" """Representation of a sleepd - Sleep As Android Stats sensor for Sleep Tracking."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
self._state = None self._state = None
@ -475,12 +361,12 @@ class SAASSleepTrackingSensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_sleep_tracking_sensor_{self._name}" return f"sleepd_sleep_tracking_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Sleep Tracking" return f"sleepd {self._name} Sleep Tracking"
@property @property
def state(self): def state(self):
@ -537,8 +423,8 @@ class SAASSleepTrackingSensor(RestoreEntity):
self._hass.states.async_set(self.entity_id, self._state) self._hass.states.async_set(self.entity_id, self._state)
_LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}") _LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}")
class SAASDisturbanceSensor(RestoreEntity): class sleepdDisturbanceSensor(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor for Disturbance Events.""" """Representation of a sleepd - Sleep As Android Stats sensor for Disturbance Events."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
@ -556,12 +442,12 @@ class SAASDisturbanceSensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_disturbance_sensor_{self._name}" return f"sleepd_disturbance_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Disturbance" return f"sleepd {self._name} Disturbance"
@property @property
def state(self): def state(self):
@ -666,8 +552,8 @@ class SAASDisturbanceSensor(RestoreEntity):
_LOGGER.debug(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Set state to 'None' due to timeout for sensor {self.name}") _LOGGER.debug(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Set state to 'None' due to timeout for sensor {self.name}")
self.async_schedule_update_ha_state() self.async_schedule_update_ha_state()
class SAASLullabySensor(RestoreEntity): class sleepdLullabySensor(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor for Lullaby.""" """Representation of a sleepd - Sleep As Android Stats sensor for Lullaby."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
self._state = None self._state = None
@ -679,12 +565,12 @@ class SAASLullabySensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_lullaby_sensor_{self._name}" return f"sleepd_lullaby_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Lullaby" return f"sleepd {self._name} Lullaby"
@property @property
def state(self): def state(self):
@ -740,8 +626,8 @@ class SAASLullabySensor(RestoreEntity):
self._hass.states.async_set(self.entity_id, self._state) self._hass.states.async_set(self.entity_id, self._state)
_LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}") _LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}")
class SAASSleepStage(RestoreEntity): class sleepdSleepStage(RestoreEntity):
"""Representation of a SAAS - Sleep As Android Stats sensor for Sleep Stage.""" """Representation of a sleepd - Sleep As Android Stats sensor for Sleep Stage."""
def __init__(self, hass, name, mapping, entry_id): def __init__(self, hass, name, mapping, entry_id):
"""Initialize the sensor.""" """Initialize the sensor."""
self._state = None self._state = None
@ -753,12 +639,12 @@ class SAASSleepStage(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_sleep_stage_sensor_{self._name}" return f"sleepd_sleep_stage_sensor_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Sleep Stage" return f"sleepd {self._name} Sleep Stage"
@property @property
def state(self): def state(self):
@ -814,7 +700,7 @@ class SAASSleepStage(RestoreEntity):
self._hass.states.async_set(self.entity_id, self._state) self._hass.states.async_set(self.entity_id, self._state)
_LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}") _LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}")
class SAASWakeStatusSensor(RestoreEntity): class sleepdWakeStatusSensor(RestoreEntity):
def __init__(self, hass, name, awake_states, sleep_states, awake_duration, sleep_duration, mqtt_topic, entry_id): def __init__(self, hass, name, awake_states, sleep_states, awake_duration, sleep_duration, mqtt_topic, entry_id):
self._state = None self._state = None
self._name = name self._name = name
@ -831,12 +717,12 @@ class SAASWakeStatusSensor(RestoreEntity):
@property @property
def unique_id(self): def unique_id(self):
"""Return a unique ID.""" """Return a unique ID."""
return f"saas_wake_status_{self._name}" return f"sleepd_wake_status_{self._name}"
@property @property
def name(self): def name(self):
"""Return the name of the sensor.""" """Return the name of the sensor."""
return f"SAAS {self._name} Wake Status" return f"sleepd {self._name} Wake Status"
@property @property
def state(self): def state(self):
@ -921,7 +807,7 @@ class SAASWakeStatusSensor(RestoreEntity):
_LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}") _LOGGER.info(f"{datetime.now().strftime('%H:%M:%S:%f')} (Line {inspect.currentframe().f_lineno}): Saved state: {self._state} for sensor {self.name}")
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the SAAS sensor platform from a config entry.""" """Set up the sleepd sensor platform from a config entry."""
name = entry.data.get(CONF_NAME, "Default Name") name = entry.data.get(CONF_NAME, "Default Name")
topic = entry.data.get(CONF_TOPIC) topic = entry.data.get(CONF_TOPIC)
awake_states = entry.data.get(CONF_AWAKE_STATES) awake_states = entry.data.get(CONF_AWAKE_STATES)
@ -932,15 +818,14 @@ async def async_setup_entry(hass, entry, async_add_entities):
hass.data[DOMAIN][entry.entry_id] = entry.data hass.data[DOMAIN][entry.entry_id] = entry.data
entities = [ entities = [
SAASSensor(hass, name, STATE_MAPPING, entry_id), sleepdSensor(hass, name, STATE_MAPPING, entry_id),
SAASAlarmEventSensor(hass, name, ALARM_EVENT_MAPPING, entry_id), sleepdAlarmEventSensor(hass, name, ALARM_EVENT_MAPPING, entry_id),
SAASNextAlarmSensor(hass, name, entry_id), sleepdSoundSensor(hass, name, SOUND_MAPPING, entry_id),
SAASSoundSensor(hass, name, SOUND_MAPPING, entry_id), sleepdSleepTrackingSensor(hass, name, SLEEP_TRACKING_MAPPING, entry_id),
SAASSleepTrackingSensor(hass, name, SLEEP_TRACKING_MAPPING, entry_id), sleepdDisturbanceSensor(hass, name, DISTURBANCE_MAPPING, entry_id),
SAASDisturbanceSensor(hass, name, DISTURBANCE_MAPPING, entry_id), sleepdLullabySensor(hass, name, LULLABY_MAPPING, entry_id),
SAASLullabySensor(hass, name, LULLABY_MAPPING, entry_id), sleepdSleepStage(hass, name, SLEEP_STAGE_MAPPING, entry_id),
SAASSleepStage(hass, name, SLEEP_STAGE_MAPPING, entry_id), sleepdWakeStatusSensor(hass, name, awake_states, sleep_states, awake_duration, sleep_duration, topic, entry_id)
SAASWakeStatusSensor(hass, name, awake_states, sleep_states, awake_duration, sleep_duration, topic, entry_id)
] ]
for entity in entities: for entity in entities:

View file

@ -4,12 +4,12 @@ from .const import DOMAIN, DAY_MAPPING
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
class SAASService: class sleepdService:
def __init__(self, hass, name, notify_target): def __init__(self, hass, name, notify_target):
self._hass = hass self._hass = hass
self._name = name self._name = name
self._notify_target = notify_target self._notify_target = notify_target
_LOGGER.debug(f"SAASService initialized with name: {name}, notify_target: {notify_target}") _LOGGER.debug(f"sleepdService initialized with name: {name}, notify_target: {notify_target}")
async def call_service(self, service_call: ServiceCall): async def call_service(self, service_call: ServiceCall):
"""Call the service.""" """Call the service."""
@ -51,7 +51,7 @@ class SAASService:
_LOGGER.error(f"Error occurred while calling service: {e}") _LOGGER.error(f"Error occurred while calling service: {e}")
async def async_setup_services(hass: HomeAssistant) -> None: async def async_setup_services(hass: HomeAssistant) -> None:
"""Set up services for the SAAS component.""" """Set up services for the sleepd component."""
_LOGGER.info(f"Setting up services for {DOMAIN}") _LOGGER.info(f"Setting up services for {DOMAIN}")
# Register the service for each entry # Register the service for each entry
for entry_id, entry_data in hass.data.get(DOMAIN, {}).items(): for entry_id, entry_data in hass.data.get(DOMAIN, {}).items():
@ -60,10 +60,10 @@ async def async_setup_services(hass: HomeAssistant) -> None:
notify_target = entry_data.get('notify_target', 'default notify target') notify_target = entry_data.get('notify_target', 'default notify target')
if notify_target: # Only register the service if notify_target was chosen if notify_target: # Only register the service if notify_target was chosen
_LOGGER.debug(f"Found notify_target: {notify_target} for name: {name}. Registering service.") _LOGGER.debug(f"Found notify_target: {notify_target} for name: {name}. Registering service.")
saas_service = SAASService(hass, name, notify_target) sleepd_service = sleepdService(hass, name, notify_target)
try: try:
hass.services.async_register(DOMAIN, f'saas_{name}_alarm_set', saas_service.call_service) hass.services.async_register(DOMAIN, f'sleepd_{name}_alarm_set', sleepd_service.call_service)
_LOGGER.info(f"Registered service: saas_{name}_alarm_set") _LOGGER.info(f"Registered service: sleepd_{name}_alarm_set")
except Exception as e: except Exception as e:
_LOGGER.error(f"Error occurred while registering service: {e}") _LOGGER.error(f"Error occurred while registering service: {e}")
else: else:

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - حالة Sleep As Android", "title": "sleepd - حالة Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "التكوين لـ SAAS - حالة Sleep As Android", "title": "التكوين لـ sleepd - حالة Sleep As Android",
"description": "تكوين الإعدادات الأساسية لتكامل SAAS.", "description": "تكوين الإعدادات الأساسية لتكامل sleepd.",
"data": { "data": {
"name": "الاسم للمستشعر", "name": "الاسم للمستشعر",
"topic_template": "موضوع MQTT لأحداث Sleep As Android", "topic_template": "موضوع MQTT لأحداث Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "إعدادات تكامل SAAS", "title": "إعدادات تكامل sleepd",
"description": "تكوين الإعدادات الأساسية لتكامل SAAS.", "description": "تكوين الإعدادات الأساسية لتكامل sleepd.",
"data": { "data": {
"name": "الاسم للمستشعر", "name": "الاسم للمستشعر",
"topic_template": "موضوع MQTT (من Sleep As Android)", "topic_template": "موضوع MQTT (من Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Sleep As Android Status", "title": "sleepd - Sleep As Android Status",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Konfiguration für SAAS - Sleep As Android Status", "title": "Konfiguration für sleepd - Sleep As Android Status",
"description": "Konfigurieren Sie die grundlegenden Einstellungen für die SAAS-Integration.", "description": "Konfigurieren Sie die grundlegenden Einstellungen für die sleepd-Integration.",
"data": { "data": {
"name": "Name für Sensor", "name": "Name für Sensor",
"topic_template": "MQTT-Thema für Sleep As Android Ereignisse", "topic_template": "MQTT-Thema für Sleep As Android Ereignisse",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS-Integrationseinstellungen", "title": "sleepd-Integrationseinstellungen",
"description": "Konfigurieren Sie die grundlegenden Einstellungen für die SAAS-Integration.", "description": "Konfigurieren Sie die grundlegenden Einstellungen für die sleepd-Integration.",
"data": { "data": {
"name": "Name für Sensor", "name": "Name für Sensor",
"topic_template": "MQTT-Thema (von Sleep As Android)", "topic_template": "MQTT-Thema (von Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Sleep As Android Status", "title": "sleepd - Sleep As Android Status",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Configuration for SAAS - Sleep As Android Status", "title": "Configuration for sleepd - Sleep As Android Status",
"description": "Configure the basic settings for the SAAS integration.", "description": "Configure the basic settings for the sleepd integration.",
"data": { "data": {
"name": "Name for Sensor", "name": "Name for Sensor",
"topic_template": "MQTT Topic for Sleep As Android Events", "topic_template": "MQTT Topic for Sleep As Android Events",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS Integration Settings", "title": "sleepd Integration Settings",
"description": "Configure the basic settings for the SAAS integration.", "description": "Configure the basic settings for the sleepd integration.",
"data": { "data": {
"name": "Name for Sensor", "name": "Name for Sensor",
"topic_template": "MQTT Topic (from Sleep As Android)", "topic_template": "MQTT Topic (from Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Estado de Sleep As Android", "title": "sleepd - Estado de Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Configuración para SAAS - Estado de Sleep As Android", "title": "Configuración para sleepd - Estado de Sleep As Android",
"description": "Configura los ajustes básicos para la integración de SAAS.", "description": "Configura los ajustes básicos para la integración de sleepd.",
"data": { "data": {
"name": "Nombre para el Sensor", "name": "Nombre para el Sensor",
"topic_template": "Tema MQTT para Eventos de Sleep As Android", "topic_template": "Tema MQTT para Eventos de Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "Configuración de Integración SAAS", "title": "Configuración de Integración sleepd",
"description": "Configura los ajustes básicos para la integración de SAAS.", "description": "Configura los ajustes básicos para la integración de sleepd.",
"data": { "data": {
"name": "Nombre para el Sensor", "name": "Nombre para el Sensor",
"topic_template": "Tema MQTT (de Sleep As Android)", "topic_template": "Tema MQTT (de Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Statut de Sleep As Android", "title": "sleepd - Statut de Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Configuration pour SAAS - Statut de Sleep As Android", "title": "Configuration pour sleepd - Statut de Sleep As Android",
"description": "Configurez les paramètres de base pour l'intégration de SAAS.", "description": "Configurez les paramètres de base pour l'intégration de sleepd.",
"data": { "data": {
"name": "Nom pour le Capteur", "name": "Nom pour le Capteur",
"topic_template": "Sujet MQTT pour les Événements de Sleep As Android", "topic_template": "Sujet MQTT pour les Événements de Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "Paramètres d'Intégration SAAS", "title": "Paramètres d'Intégration sleepd",
"description": "Configurez les paramètres de base pour l'intégration de SAAS.", "description": "Configurez les paramètres de base pour l'intégration de sleepd.",
"data": { "data": {
"name": "Nom pour le Capteur", "name": "Nom pour le Capteur",
"topic_template": "Sujet MQTT (de Sleep As Android)", "topic_template": "Sujet MQTT (de Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Stato di Sleep As Android", "title": "sleepd - Stato di Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Configurazione per SAAS - Stato di Sleep As Android", "title": "Configurazione per sleepd - Stato di Sleep As Android",
"description": "Configura le impostazioni di base per l'integrazione SAAS.", "description": "Configura le impostazioni di base per l'integrazione sleepd.",
"data": { "data": {
"name": "Nome per Sensore", "name": "Nome per Sensore",
"topic_template": "Topic MQTT per Eventi Sleep As Android", "topic_template": "Topic MQTT per Eventi Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "Impostazioni di Integrazione SAAS", "title": "Impostazioni di Integrazione sleepd",
"description": "Configura le impostazioni di base per l'integrazione SAAS.", "description": "Configura le impostazioni di base per l'integrazione sleepd.",
"data": { "data": {
"name": "Nome per Sensore", "name": "Nome per Sensore",
"topic_template": "Topic MQTT (da Sleep As Android)", "topic_template": "Topic MQTT (da Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - 睡眠如 Android 狀態", "title": "sleepd - 睡眠如 Android 狀態",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "SAAS - 睡眠如 Android 狀態配置", "title": "sleepd - 睡眠如 Android 狀態配置",
"description": "配置 SAAS 整合的基本設置。", "description": "配置 sleepd 整合的基本設置。",
"data": { "data": {
"name": "感應器名稱", "name": "感應器名稱",
"topic_template": "睡眠如 Android 事件的 MQTT 主題", "topic_template": "睡眠如 Android 事件的 MQTT 主題",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS 整合設置", "title": "sleepd 整合設置",
"description": "配置 SAAS 整合的基本設置。", "description": "配置 sleepd 整合的基本設置。",
"data": { "data": {
"name": "感應器名稱", "name": "感應器名稱",
"topic_template": "MQTT 主題(來自睡眠如 Android", "topic_template": "MQTT 主題(來自睡眠如 Android",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Sleep As Android 상태", "title": "sleepd - Sleep As Android 상태",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "SAAS - Sleep As Android 상태 설정", "title": "sleepd - Sleep As Android 상태 설정",
"description": "SAAS 통합의 기본 설정을 구성합니다.", "description": "sleepd 통합의 기본 설정을 구성합니다.",
"data": { "data": {
"name": "센서 이름", "name": "센서 이름",
"topic_template": "Sleep As Android 이벤트의 MQTT 주제", "topic_template": "Sleep As Android 이벤트의 MQTT 주제",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS 통합 설정", "title": "sleepd 통합 설정",
"description": "SAAS 통합의 기본 설정을 구성합니다.", "description": "sleepd 통합의 기본 설정을 구성합니다.",
"data": { "data": {
"name": "센서 이름", "name": "센서 이름",
"topic_template": "Sleep As Android에서의 MQTT 주제", "topic_template": "Sleep As Android에서의 MQTT 주제",

View file

@ -1,10 +1,10 @@
{ {
"title": "Configuratie voor SAAS - Sleep As Android Status", "title": "Configuratie voor sleepd - Sleep As Android Status",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Configuratie voor SAAS - Sleep As Android Status", "title": "Configuratie voor sleepd - Sleep As Android Status",
"description": "Configureer de basisinstellingen voor de SAAS-integratie.", "description": "Configureer de basisinstellingen voor de sleepd-integratie.",
"data": { "data": {
"name": "Naam voor Sensor", "name": "Naam voor Sensor",
"topic_template": "MQTT-onderwerp voor Sleep As Android Gebeurtenissen", "topic_template": "MQTT-onderwerp voor Sleep As Android Gebeurtenissen",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS-Integratie-Instellingen", "title": "sleepd-Integratie-Instellingen",
"description": "Configureer de basisinstellingen voor de SAAS-integratie.", "description": "Configureer de basisinstellingen voor de sleepd-integratie.",
"data": { "data": {
"name": "Naam voor Sensor", "name": "Naam voor Sensor",
"topic_template": "MQTT-Onderwerp (van Sleep As Android)", "topic_template": "MQTT-Onderwerp (van Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Status Sleep As Android", "title": "sleepd - Status Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Konfiguracja dla SAAS - Status Sleep As Android", "title": "Konfiguracja dla sleepd - Status Sleep As Android",
"description": "Konfiguracja podstawowych ustawień dla integracji SAAS.", "description": "Konfiguracja podstawowych ustawień dla integracji sleepd.",
"data": { "data": {
"name": "Nazwa dla czujnika", "name": "Nazwa dla czujnika",
"topic_template": "Temat MQTT dla zdarzeń Sleep As Android", "topic_template": "Temat MQTT dla zdarzeń Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "Ustawienia integracji SAAS", "title": "Ustawienia integracji sleepd",
"description": "Konfiguracja podstawowych ustawień dla integracji SAAS.", "description": "Konfiguracja podstawowych ustawień dla integracji sleepd.",
"data": { "data": {
"name": "Nazwa dla czujnika", "name": "Nazwa dla czujnika",
"topic_template": "Temat MQTT (od Sleep As Android)", "topic_template": "Temat MQTT (od Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Status do Sleep As Android", "title": "sleepd - Status do Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Configuração para SAAS - Status do Sleep As Android", "title": "Configuração para sleepd - Status do Sleep As Android",
"description": "Configure as configurações básicas para a integração SAAS.", "description": "Configure as configurações básicas para a integração sleepd.",
"data": { "data": {
"name": "Nome para Sensor", "name": "Nome para Sensor",
"topic_template": "Tópico MQTT para Eventos do Sleep As Android", "topic_template": "Tópico MQTT para Eventos do Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "Configurações de Integração SAAS", "title": "Configurações de Integração sleepd",
"description": "Configure as configurações básicas para a integração SAAS.", "description": "Configure as configurações básicas para a integração sleepd.",
"data": { "data": {
"name": "Nome para Sensor", "name": "Nome para Sensor",
"topic_template": "Tópico MQTT (do Sleep As Android)", "topic_template": "Tópico MQTT (do Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - 睡眠如 Android 狀態", "title": "sleepd - 睡眠如 Android 狀態",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "SAAS - 睡眠如 Android 狀態配置", "title": "sleepd - 睡眠如 Android 狀態配置",
"description": "配置 SAAS 整合的基本設置。", "description": "配置 sleepd 整合的基本設置。",
"data": { "data": {
"name": "感應器名稱", "name": "感應器名稱",
"topic_template": "睡眠如 Android 事件的 MQTT 主題", "topic_template": "睡眠如 Android 事件的 MQTT 主題",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS 整合設置", "title": "sleepd 整合設置",
"description": "配置 SAAS 整合的基本設置。", "description": "配置 sleepd 整合的基本設置。",
"data": { "data": {
"name": "感應器名稱", "name": "感應器名稱",
"topic_template": "MQTT 主題(來自睡眠如 Android", "topic_template": "MQTT 主題(來自睡眠如 Android",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Статус Sleep As Android", "title": "sleepd - Статус Sleep As Android",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Конфигурация для SAAS - Статус Sleep As Android", "title": "Конфигурация для sleepd - Статус Sleep As Android",
"description": "Настройка основных параметров для интеграции SAAS.", "description": "Настройка основных параметров для интеграции sleepd.",
"data": { "data": {
"name": "Имя для датчика", "name": "Имя для датчика",
"topic_template": "Тема MQTT для событий Sleep As Android", "topic_template": "Тема MQTT для событий Sleep As Android",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "Настройки интеграции SAAS", "title": "Настройки интеграции sleepd",
"description": "Настройка основных параметров для интеграции SAAS.", "description": "Настройка основных параметров для интеграции sleepd.",
"data": { "data": {
"name": "Имя для датчика", "name": "Имя для датчика",
"topic_template": "Тема MQTT (от Sleep As Android)", "topic_template": "Тема MQTT (от Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Sleep As Android Status", "title": "sleepd - Sleep As Android Status",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "Konfiguration för SAAS - Sleep As Android Status", "title": "Konfiguration för sleepd - Sleep As Android Status",
"description": "Konfigurera de grundläggande inställningarna för SAAS-integrationen.", "description": "Konfigurera de grundläggande inställningarna för sleepd-integrationen.",
"data": { "data": {
"name": "Namn för Sensor", "name": "Namn för Sensor",
"topic_template": "MQTT Ämne för Sleep As Android Händelser", "topic_template": "MQTT Ämne för Sleep As Android Händelser",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS Integrationsinställningar", "title": "sleepd Integrationsinställningar",
"description": "Konfigurera de grundläggande inställningarna för SAAS-integrationen.", "description": "Konfigurera de grundläggande inställningarna för sleepd-integrationen.",
"data": { "data": {
"name": "Namn för Sensor", "name": "Namn för Sensor",
"topic_template": "MQTT Ämne (från Sleep As Android)", "topic_template": "MQTT Ämne (från Sleep As Android)",

View file

@ -1,10 +1,10 @@
{ {
"title": "SAAS - Sleep As Android 状态", "title": "sleepd - Sleep As Android 状态",
"config": { "config": {
"step": { "step": {
"user": { "user": {
"title": "SAAS - Sleep As Android 状态配置", "title": "sleepd - Sleep As Android 状态配置",
"description": "配置 SAAS 集成的基本设置。", "description": "配置 sleepd 集成的基本设置。",
"data": { "data": {
"name": "传感器名称", "name": "传感器名称",
"topic_template": "Sleep As Android 事件的 MQTT 主题", "topic_template": "Sleep As Android 事件的 MQTT 主题",
@ -20,8 +20,8 @@
"options": { "options": {
"step": { "step": {
"init": { "init": {
"title": "SAAS 集成设置", "title": "sleepd 集成设置",
"description": "配置 SAAS 集成的基本设置。", "description": "配置 sleepd 集成的基本设置。",
"data": { "data": {
"name": "传感器名称", "name": "传感器名称",
"topic_template": "Sleep As Android 的 MQTT 主题", "topic_template": "Sleep As Android 的 MQTT 主题",

View file

@ -1,4 +1,4 @@
{ {
"name": "SAAS - Sleep As Android Status", "name": "sleepd - Sleep As Android Status",
"render_readme": true "render_readme": true
} }