Skip to content

Commit df68448

Browse files
jbouwhmishmannerszweckj
authored
Move translatable URL from rainmachine push_weather_data action description (home-assistant#157941)
Co-authored-by: Michelle "MishManners®™" Duke <[email protected]> Co-authored-by: Josef Zweck <[email protected]>
1 parent bf7b966 commit df68448

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

homeassistant/components/rainmachine/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@
5454
)
5555
from .coordinator import RainMachineDataUpdateCoordinator
5656

57-
DEFAULT_SSL = True
57+
API_URL_REFERENCE = (
58+
"https://rainmachine.docs.apiary.io/#reference/weather-services/parserdata/post"
59+
)
5860

61+
DEFAULT_SSL = True
5962

6063
PLATFORMS = [
6164
Platform.BINARY_SENSOR,
@@ -455,7 +458,15 @@ async def async_unrestrict_watering(
455458
):
456459
if hass.services.has_service(DOMAIN, service_name):
457460
continue
458-
hass.services.async_register(DOMAIN, service_name, method, schema=schema)
461+
hass.services.async_register(
462+
DOMAIN,
463+
service_name,
464+
method,
465+
schema=schema,
466+
description_placeholders={
467+
"api_url": API_URL_REFERENCE,
468+
},
469+
)
459470

460471
return True
461472

homeassistant/components/rainmachine/strings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"name": "Push flow meter data"
129129
},
130130
"push_weather_data": {
131-
"description": "Sends weather data from Home Assistant to the RainMachine device.\nLocal Weather Push service should be enabled from Settings > Weather > Developer tab for RainMachine to consider the values being sent. Units must be sent in metric; no conversions are performed by the integration.\nSee details of RainMachine API here: https://rainmachine.docs.apiary.io/#reference/weather-services/parserdata/post.",
131+
"description": "Sends weather data from Home Assistant to the RainMachine device.\nLocal Weather Push service should be enabled from Settings > Weather > Developer tab for RainMachine to consider the values being sent. Units must be sent in metric; no conversions are performed by the integration.\nSee details of RainMachine API here: {api_url}",
132132
"fields": {
133133
"condition": {
134134
"description": "Current weather condition code (WNUM).",

0 commit comments

Comments
 (0)