Skip to content

Commit

Permalink
fix: Change var names everywhere per 37baa40
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgoette committed Jan 8, 2023
1 parent c046c7a commit 6f22b46
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions custom_components/babybuddy/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ def update_entities() -> None:
"add_bmi",
{
vol.Required(ATTR_BMI): cv.positive_float,
vol.Optional(ATTR_DATE): cv.date,
vol.Optional("bmi_date"): cv.date,
vol.Optional(ATTR_NOTES): cv.string,
},
"async_add_bmi",
)
platform.async_register_entity_service(
"add_diaper_change",
{
vol.Optional(ATTR_TIME): vol.Any(cv.datetime, cv.time),
vol.Optional(ATTR_TYPE): vol.In(DIAPER_TYPES),
vol.Optional("change_time"): vol.Any(cv.datetime, cv.time),
vol.Optional("diaper_type"): vol.In(DIAPER_TYPES),
vol.Optional(ATTR_COLOR): vol.In(DIAPER_COLORS),
vol.Optional(ATTR_AMOUNT): cv.positive_int,
vol.Optional(ATTR_NOTES): cv.string,
Expand All @@ -109,7 +109,7 @@ def update_entities() -> None:
"add_head_circumference",
{
vol.Required(ATTR_HEAD_CIRCUMFERENCE_UNDERSCORE): cv.positive_float,
vol.Optional(ATTR_DATE): cv.date,
vol.Optional("head_circ_date"): cv.date,
vol.Optional(ATTR_NOTES): cv.string,
},
"async_add_head_circumference",
Expand All @@ -118,7 +118,7 @@ def update_entities() -> None:
"add_height",
{
vol.Required(ATTR_HEIGHT): cv.positive_float,
vol.Optional(ATTR_DATE): cv.date,
vol.Optional("height_date"): cv.date,
vol.Optional(ATTR_NOTES): cv.string,
},
"async_add_height",
Expand All @@ -127,15 +127,15 @@ def update_entities() -> None:
"add_note",
{
vol.Required(ATTR_NOTE): cv.string,
vol.Optional(ATTR_TIME): vol.Any(cv.datetime, cv.time),
vol.Optional("note_time"): vol.Any(cv.datetime, cv.time),
},
"async_add_note",
)
platform.async_register_entity_service(
"add_pumping",
{
vol.Required(ATTR_AMOUNT): cv.positive_int,
vol.Optional(ATTR_TIME): vol.Any(cv.datetime, cv.time),
vol.Optional("pumping_time"): vol.Any(cv.datetime, cv.time),
vol.Optional(ATTR_NOTES): cv.string,
},
"async_add_pumping",
Expand All @@ -144,7 +144,7 @@ def update_entities() -> None:
"add_temperature",
{
vol.Required(ATTR_TEMPERATURE): cv.positive_float,
vol.Optional(ATTR_TIME): vol.Any(cv.datetime, cv.time),
vol.Optional("temperature_time"): vol.Any(cv.datetime, cv.time),
vol.Optional(ATTR_NOTES): cv.string,
},
"async_add_temperature",
Expand All @@ -153,7 +153,7 @@ def update_entities() -> None:
"add_weight",
{
vol.Required(ATTR_WEIGHT): cv.positive_float,
vol.Optional(ATTR_DATE): cv.date,
vol.Optional("weight_date"): cv.date,
vol.Optional(ATTR_NOTES): cv.string,
},
"async_add_weight",
Expand Down
20 changes: 10 additions & 10 deletions custom_components/babybuddy/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_bmi:
max: 100.0
step: 0.1
mode: box
date:
bmi_date:
name: BMI date
description: BMI date in YYYY-MM-DD format
example: "2022-06-20"
Expand Down Expand Up @@ -67,13 +67,13 @@ add_diaper_change:
domain: sensor
device_class: babybuddy_child
fields:
time:
change_time:
name: Change time
description: Change time
example: "15:00:00"
selector:
time:
type:
diaper_type:
name: Diaper type
description: Type of diaper change
example: Wet
Expand Down Expand Up @@ -137,7 +137,7 @@ add_feeding:
example: "15:10:00"
selector:
time:
type:
feed_type:
name: Feeding type
description: Feeding type
example: Breast milk
Expand Down Expand Up @@ -200,7 +200,7 @@ add_head_circumference:
max: 100.0
step: 0.1
mode: box
date:
head_circ_date:
name: Head circumference date
description: Head circumference date in YYYY-MM-DD format
example: "2022-06-20"
Expand Down Expand Up @@ -234,7 +234,7 @@ add_height:
max: 100.0
step: 0.1
mode: box
date:
height_date:
name: Height date
description: Height date in YYYY-MM-DD format
example: "2022-06-20"
Expand Down Expand Up @@ -265,7 +265,7 @@ add_note:
selector:
text:
multiline: true
time:
note_time:
name: Note time
description: Note time
example: "15:00:00"
Expand All @@ -290,7 +290,7 @@ add_pumping:
min: 1
max: 10
mode: box
time:
pumping_time:
name: Pumping time
description: Pumping time
example: "15:00:00"
Expand Down Expand Up @@ -358,7 +358,7 @@ add_temperature:
max: 150.0
step: 0.1
mode: box
time:
temperature_time:
name: Temperature time
description: Temperature time
example: "15:00:00"
Expand Down Expand Up @@ -426,7 +426,7 @@ add_weight:
max: 100.0
step: 0.1
mode: box
date:
weight_date:
name: Weight date
description: Weight date in YYYY-MM-DD format
example: "2022-06-20"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/babybuddy/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def update_entities() -> None:
platform.async_register_entity_service(
"add_feeding",
{
vol.Required(ATTR_TYPE): vol.In(FEEDING_TYPES),
vol.Required("feed_type"): vol.In(FEEDING_TYPES),
vol.Required(ATTR_METHOD): vol.In(FEEDING_METHODS),
**COMMON_FIELDS,
vol.Optional(ATTR_AMOUNT): cv.positive_float,
Expand Down

0 comments on commit 6f22b46

Please sign in to comment.