f76d545a084e48f0cdaf59cd5937f9ae2eee691d,homeassistant/helpers/config_validation.py,,,#,222
Before Change
PLATFORM_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): string,
CONF_SCAN_INTERVAL: vol.All(vol.Coerce(int), vol.Range(min=1)),
}, extra=vol.ALLOW_EXTRA)
EVENT_SCHEMA = vol.Schema({
vol.Required("event"): string,
"event_data": dict
})
SERVICE_SCHEMA = vol.All(vol.Schema({
vol.Exclusive("service", "service name"): service,
vol.Exclusive("service_template", "service name"): template,
vol.Optional("data"): dict,
vol.Optional("data_template"): {match_all: template},
vol.Optional("entity_id"): entity_ids,
}), has_at_least_one_key("service", "service_template"))
After Change
raise vol.Invalid("Icons should start with prefix "mdi:"")
time_period_dict = vol.All(
dict, vol.Schema({
"days": vol.Coerce(int),
"hours": vol.Coerce(int),
"minutes": vol.Coerce(int),
"seconds": vol.Coerce(int),
"milliseconds": vol.Coerce(int),
}),
has_at_least_one_key("days", "hours", "minutes",
"seconds", "milliseconds"),
lambda value: timedelta(**value))
def time_period_str(value):
Validate and transform time offset.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: home-assistant/home-assistant
Commit Name: f76d545a084e48f0cdaf59cd5937f9ae2eee691d
Time: 2016-04-21
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/helpers/config_validation.py
Class Name:
Method Name:
Project Name: home-assistant/home-assistant
Commit Name: 45649824ca65b49cc676393d660e8c18dd488acf
Time: 2018-08-27
Author: hobbypunk90@users.noreply.github.com
File Name: homeassistant/components/hangouts/const.py
Class Name:
Method Name:
Project Name: home-assistant/home-assistant
Commit Name: f76d545a084e48f0cdaf59cd5937f9ae2eee691d
Time: 2016-04-21
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/helpers/config_validation.py
Class Name:
Method Name:
Project Name: home-assistant/home-assistant
Commit Name: a953601abdfe6ab1fc5b1026ec9fb72530201fcd
Time: 2018-08-27
Author: hobbypunk90@users.noreply.github.com
File Name: homeassistant/components/hangouts/const.py
Class Name:
Method Name: