Search is not available for this dataset
identifier stringlengths 1 155 | parameters stringlengths 2 6.09k | docstring stringlengths 11 63.4k | docstring_summary stringlengths 0 63.4k | function stringlengths 29 99.8k | function_tokens list | start_point list | end_point list | language stringclasses 1
value | docstring_language stringlengths 2 7 | docstring_language_predictions stringlengths 18 23 | is_langid_reliable stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
ZWaveServices.async_register | (self) | Register all our services. | Register all our services. | def async_register(self):
"""Register all our services."""
self._hass.services.async_register(
const.DOMAIN,
const.SERVICE_ADD_NODE,
self.async_add_node,
schema=vol.Schema(
{
vol.Optional(const.ATTR_INSTANCE_ID, default=... | [
"def",
"async_register",
"(",
"self",
")",
":",
"self",
".",
"_hass",
".",
"services",
".",
"async_register",
"(",
"const",
".",
"DOMAIN",
",",
"const",
".",
"SERVICE_ADD_NODE",
",",
"self",
".",
"async_add_node",
",",
"schema",
"=",
"vol",
".",
"Schema",
... | [
24,
4
] | [
85,
9
] | python | en | ['en', 'en', 'en'] | True |
ZWaveServices.async_set_config_parameter | (self, service) | Set a config parameter to a node. | Set a config parameter to a node. | def async_set_config_parameter(self, service):
"""Set a config parameter to a node."""
instance_id = service.data[const.ATTR_INSTANCE_ID]
node_id = service.data[const.ATTR_NODE_ID]
param = service.data[const.ATTR_CONFIG_PARAMETER]
selection = service.data[const.ATTR_CONFIG_VALUE]... | [
"def",
"async_set_config_parameter",
"(",
"self",
",",
"service",
")",
":",
"instance_id",
"=",
"service",
".",
"data",
"[",
"const",
".",
"ATTR_INSTANCE_ID",
"]",
"node_id",
"=",
"service",
".",
"data",
"[",
"const",
".",
"ATTR_NODE_ID",
"]",
"param",
"=",
... | [
88,
4
] | [
105,
9
] | python | en | ['en', 'pt', 'en'] | True |
ZWaveServices.async_add_node | (self, service) | Enter inclusion mode on the controller. | Enter inclusion mode on the controller. | def async_add_node(self, service):
"""Enter inclusion mode on the controller."""
instance_id = service.data[const.ATTR_INSTANCE_ID]
secure = service.data[const.ATTR_SECURE]
instance = self._manager.get_instance(instance_id)
if instance is None:
raise ValueError(f"No O... | [
"def",
"async_add_node",
"(",
"self",
",",
"service",
")",
":",
"instance_id",
"=",
"service",
".",
"data",
"[",
"const",
".",
"ATTR_INSTANCE_ID",
"]",
"secure",
"=",
"service",
".",
"data",
"[",
"const",
".",
"ATTR_SECURE",
"]",
"instance",
"=",
"self",
... | [
108,
4
] | [
115,
33
] | python | en | ['en', 'en', 'en'] | True |
ZWaveServices.async_remove_node | (self, service) | Enter exclusion mode on the controller. | Enter exclusion mode on the controller. | def async_remove_node(self, service):
"""Enter exclusion mode on the controller."""
instance_id = service.data[const.ATTR_INSTANCE_ID]
instance = self._manager.get_instance(instance_id)
if instance is None:
raise ValueError(f"No OpenZWave Instance with ID {instance_id}")
... | [
"def",
"async_remove_node",
"(",
"self",
",",
"service",
")",
":",
"instance_id",
"=",
"service",
".",
"data",
"[",
"const",
".",
"ATTR_INSTANCE_ID",
"]",
"instance",
"=",
"self",
".",
"_manager",
".",
"get_instance",
"(",
"instance_id",
")",
"if",
"instance... | [
118,
4
] | [
124,
30
] | python | en | ['en', 'en', 'en'] | True |
ZWaveServices.async_cancel_command | (self, service) | Tell the controller to cancel an add or remove command. | Tell the controller to cancel an add or remove command. | def async_cancel_command(self, service):
"""Tell the controller to cancel an add or remove command."""
instance_id = service.data[const.ATTR_INSTANCE_ID]
instance = self._manager.get_instance(instance_id)
if instance is None:
raise ValueError(f"No OpenZWave Instance with ID {... | [
"def",
"async_cancel_command",
"(",
"self",
",",
"service",
")",
":",
"instance_id",
"=",
"service",
".",
"data",
"[",
"const",
".",
"ATTR_INSTANCE_ID",
"]",
"instance",
"=",
"self",
".",
"_manager",
".",
"get_instance",
"(",
"instance_id",
")",
"if",
"insta... | [
127,
4
] | [
133,
44
] | python | en | ['en', 'en', 'en'] | True |
deprecated_substitute | (substitute_name: str) | Help migrate properties to new names.
When a property is added to replace an older property, this decorator can
be added to the new property, listing the old property as the substitute.
If the old property is defined, its value will be used instead, and a log
warning will be issued alerting the user of... | Help migrate properties to new names. | def deprecated_substitute(substitute_name: str) -> Callable[..., Callable]:
"""Help migrate properties to new names.
When a property is added to replace an older property, this decorator can
be added to the new property, listing the old property as the substitute.
If the old property is defined, its va... | [
"def",
"deprecated_substitute",
"(",
"substitute_name",
":",
"str",
")",
"->",
"Callable",
"[",
"...",
",",
"Callable",
"]",
":",
"def",
"decorator",
"(",
"func",
":",
"Callable",
")",
"->",
"Callable",
":",
"\"\"\"Decorate function as deprecated.\"\"\"",
"def",
... | [
11,
0
] | [
49,
20
] | python | en | ['en', 'en', 'en'] | True |
get_deprecated | (
config: dict[str, Any], new_name: str, old_name: str, default: Any | None = None
) | Allow an old config name to be deprecated with a replacement.
If the new config isn't found, but the old one is, the old value is used
and a warning is issued to the user.
| Allow an old config name to be deprecated with a replacement. | def get_deprecated(
config: dict[str, Any], new_name: str, old_name: str, default: Any | None = None
) -> Any | None:
"""Allow an old config name to be deprecated with a replacement.
If the new config isn't found, but the old one is, the old value is used
and a warning is issued to the user.
"""
... | [
"def",
"get_deprecated",
"(",
"config",
":",
"dict",
"[",
"str",
",",
"Any",
"]",
",",
"new_name",
":",
"str",
",",
"old_name",
":",
"str",
",",
"default",
":",
"Any",
"|",
"None",
"=",
"None",
")",
"->",
"Any",
"|",
"None",
":",
"if",
"old_name",
... | [
52,
0
] | [
79,
40
] | python | en | ['en', 'en', 'en'] | True |
deprecated_class | (replacement: str) | Mark class as deprecated and provide a replacement class to be used instead. | Mark class as deprecated and provide a replacement class to be used instead. | def deprecated_class(replacement: str) -> Any:
"""Mark class as deprecated and provide a replacement class to be used instead."""
def deprecated_decorator(cls: Any) -> Any:
"""Decorate class as deprecated."""
@functools.wraps(cls)
def deprecated_cls(*args: Any, **kwargs: Any) -> Any:
... | [
"def",
"deprecated_class",
"(",
"replacement",
":",
"str",
")",
"->",
"Any",
":",
"def",
"deprecated_decorator",
"(",
"cls",
":",
"Any",
")",
"->",
"Any",
":",
"\"\"\"Decorate class as deprecated.\"\"\"",
"@",
"functools",
".",
"wraps",
"(",
"cls",
")",
"def",... | [
82,
0
] | [
96,
31
] | python | en | ['en', 'en', 'en'] | True |
deprecated_function | (replacement: str) | Mark function as deprecated and provide a replacement function to be used instead. | Mark function as deprecated and provide a replacement function to be used instead. | def deprecated_function(replacement: str) -> Callable[..., Callable]:
"""Mark function as deprecated and provide a replacement function to be used instead."""
def deprecated_decorator(func: Callable) -> Callable:
"""Decorate function as deprecated."""
@functools.wraps(func)
def depreca... | [
"def",
"deprecated_function",
"(",
"replacement",
":",
"str",
")",
"->",
"Callable",
"[",
"...",
",",
"Callable",
"]",
":",
"def",
"deprecated_decorator",
"(",
"func",
":",
"Callable",
")",
"->",
"Callable",
":",
"\"\"\"Decorate function as deprecated.\"\"\"",
"@"... | [
99,
0
] | [
113,
31
] | python | en | ['en', 'en', 'en'] | True |
device_reg | (hass) | Return an empty, loaded, registry. | Return an empty, loaded, registry. | def device_reg(hass):
"""Return an empty, loaded, registry."""
return mock_device_registry(hass) | [
"def",
"device_reg",
"(",
"hass",
")",
":",
"return",
"mock_device_registry",
"(",
"hass",
")"
] | [
25,
0
] | [
27,
37
] | python | en | ['en', 'fy', 'en'] | True |
entity_reg | (hass) | Return an empty, loaded, registry. | Return an empty, loaded, registry. | def entity_reg(hass):
"""Return an empty, loaded, registry."""
return mock_registry(hass) | [
"def",
"entity_reg",
"(",
"hass",
")",
":",
"return",
"mock_registry",
"(",
"hass",
")"
] | [
31,
0
] | [
33,
30
] | python | en | ['en', 'fy', 'en'] | True |
calls | (hass) | Track calls to a mock service. | Track calls to a mock service. | def calls(hass):
"""Track calls to a mock service."""
return async_mock_service(hass, "test", "automation") | [
"def",
"calls",
"(",
"hass",
")",
":",
"return",
"async_mock_service",
"(",
"hass",
",",
"\"test\"",
",",
"\"automation\"",
")"
] | [
37,
0
] | [
39,
57
] | python | en | ['en', 'en', 'en'] | True |
test_get_conditions | (hass, device_reg, entity_reg) | Test we get the expected conditions from a switch. | Test we get the expected conditions from a switch. | async def test_get_conditions(hass, device_reg, entity_reg):
"""Test we get the expected conditions from a switch."""
config_entry = MockConfigEntry(domain="test", data={})
config_entry.add_to_hass(hass)
device_entry = device_reg.async_get_or_create(
config_entry_id=config_entry.entry_id,
... | [
"async",
"def",
"test_get_conditions",
"(",
"hass",
",",
"device_reg",
",",
"entity_reg",
")",
":",
"config_entry",
"=",
"MockConfigEntry",
"(",
"domain",
"=",
"\"test\"",
",",
"data",
"=",
"{",
"}",
")",
"config_entry",
".",
"add_to_hass",
"(",
"hass",
")",... | [
42,
0
] | [
68,
44
] | python | en | ['en', 'en', 'en'] | True |
test_get_condition_capabilities | (hass, device_reg, entity_reg) | Test we get the expected capabilities from a switch condition. | Test we get the expected capabilities from a switch condition. | async def test_get_condition_capabilities(hass, device_reg, entity_reg):
"""Test we get the expected capabilities from a switch condition."""
config_entry = MockConfigEntry(domain="test", data={})
config_entry.add_to_hass(hass)
device_entry = device_reg.async_get_or_create(
config_entry_id=confi... | [
"async",
"def",
"test_get_condition_capabilities",
"(",
"hass",
",",
"device_reg",
",",
"entity_reg",
")",
":",
"config_entry",
"=",
"MockConfigEntry",
"(",
"domain",
"=",
"\"test\"",
",",
"data",
"=",
"{",
"}",
")",
"config_entry",
".",
"add_to_hass",
"(",
"h... | [
71,
0
] | [
90,
52
] | python | en | ['en', 'en', 'en'] | True |
test_if_state | (hass, calls, enable_custom_integrations) | Test for turn_on and turn_off conditions. | Test for turn_on and turn_off conditions. | async def test_if_state(hass, calls, enable_custom_integrations):
"""Test for turn_on and turn_off conditions."""
platform = getattr(hass.components, f"test.{DOMAIN}")
platform.init()
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
await hass.async_block_till_don... | [
"async",
"def",
"test_if_state",
"(",
"hass",
",",
"calls",
",",
"enable_custom_integrations",
")",
":",
"platform",
"=",
"getattr",
"(",
"hass",
".",
"components",
",",
"f\"test.{DOMAIN}\"",
")",
"platform",
".",
"init",
"(",
")",
"assert",
"await",
"async_se... | [
93,
0
] | [
164,
64
] | python | en | ['en', 'en', 'en'] | True |
test_if_fires_on_for_condition | (hass, calls, enable_custom_integrations) | Test for firing if condition is on with delay. | Test for firing if condition is on with delay. | async def test_if_fires_on_for_condition(hass, calls, enable_custom_integrations):
"""Test for firing if condition is on with delay."""
point1 = dt_util.utcnow()
point2 = point1 + timedelta(seconds=10)
point3 = point2 + timedelta(seconds=10)
platform = getattr(hass.components, f"test.{DOMAIN}")
... | [
"async",
"def",
"test_if_fires_on_for_condition",
"(",
"hass",
",",
"calls",
",",
"enable_custom_integrations",
")",
":",
"point1",
"=",
"dt_util",
".",
"utcnow",
"(",
")",
"point2",
"=",
"point1",
"+",
"timedelta",
"(",
"seconds",
"=",
"10",
")",
"point3",
... | [
167,
0
] | [
235,
68
] | python | en | ['en', 'en', 'en'] | True |
GCPlotter.render | (self,
data,
chart_type,
chart_package='corechart',
options=None,
div_id="chart",
head="") | Render the data in HTML template. | Render the data in HTML template. | def render(self,
data,
chart_type,
chart_package='corechart',
options=None,
div_id="chart",
head=""):
"""Render the data in HTML template."""
if not self.is_valid_name(div_id):
raise ValueError(
... | [
"def",
"render",
"(",
"self",
",",
"data",
",",
"chart_type",
",",
"chart_package",
"=",
"'corechart'",
",",
"options",
"=",
"None",
",",
"div_id",
"=",
"\"chart\"",
",",
"head",
"=",
"\"\"",
")",
":",
"if",
"not",
"self",
".",
"is_valid_name",
"(",
"d... | [
35,
4
] | [
55,
73
] | python | en | ['en', 'en', 'en'] | True |
GCPlotter.plot_and_save | (self,
data,
chart_type,
chart_package='corechart',
options=None,
w=800,
h=420,
filename='chart',
overwrite=True) | Save the rendered html to a file and return an IFrame to display the plot in the notebook. | Save the rendered html to a file and return an IFrame to display the plot in the notebook. | def plot_and_save(self,
data,
chart_type,
chart_package='corechart',
options=None,
w=800,
h=420,
filename='chart',
overwrite=True):
"""S... | [
"def",
"plot_and_save",
"(",
"self",
",",
"data",
",",
"chart_type",
",",
"chart_package",
"=",
"'corechart'",
",",
"options",
"=",
"None",
",",
"w",
"=",
"800",
",",
"h",
"=",
"420",
",",
"filename",
"=",
"'chart'",
",",
"overwrite",
"=",
"True",
")",... | [
57,
4
] | [
69,
47
] | python | en | ['en', 'en', 'en'] | True |
GCPlotter.plot | (self,
data,
chart_type,
chart_package='corechart',
options=None,
w=800,
h=420) | Output an iframe containing the plot in the notebook without saving. | Output an iframe containing the plot in the notebook without saving. | def plot(self,
data,
chart_type,
chart_package='corechart',
options=None,
w=800,
h=420):
"""Output an iframe containing the plot in the notebook without saving."""
return HTML(
self.iframe.format(
s... | [
"def",
"plot",
"(",
"self",
",",
"data",
",",
"chart_type",
",",
"chart_package",
"=",
"'corechart'",
",",
"options",
"=",
"None",
",",
"w",
"=",
"800",
",",
"h",
"=",
"420",
")",
":",
"return",
"HTML",
"(",
"self",
".",
"iframe",
".",
"format",
"(... | [
71,
4
] | [
88,
21
] | python | en | ['en', 'en', 'en'] | True |
GCPlotter.save | (self,
data,
chart_type,
chart_package='corechart',
options=None,
filename='chart',
overwrite=True) | Save the rendered html to a file in the same directory as the notebook. | Save the rendered html to a file in the same directory as the notebook. | def save(self,
data,
chart_type,
chart_package='corechart',
options=None,
filename='chart',
overwrite=True):
"""Save the rendered html to a file in the same directory as the notebook."""
html = self.render(
data=da... | [
"def",
"save",
"(",
"self",
",",
"data",
",",
"chart_type",
",",
"chart_package",
"=",
"'corechart'",
",",
"options",
"=",
"None",
",",
"filename",
"=",
"'chart'",
",",
"overwrite",
"=",
"True",
")",
":",
"html",
"=",
"self",
".",
"render",
"(",
"data"... | [
90,
4
] | [
114,
53
] | python | en | ['en', 'en', 'en'] | True |
affine_skew | (tilt, phi, img, mask=None) |
affine_skew(tilt, phi, img, mask=None) -> skew_img, skew_mask, Ai
Ai - is an affine transform matrix from skew_img to img
|
affine_skew(tilt, phi, img, mask=None) -> skew_img, skew_mask, Ai | def affine_skew(tilt, phi, img, mask=None):
'''
affine_skew(tilt, phi, img, mask=None) -> skew_img, skew_mask, Ai
Ai - is an affine transform matrix from skew_img to img
'''
h, w = img.shape[:2]
if mask is None:
mask = np.zeros((h, w), np.uint8)
mask[:] = 255
A = np.float32(... | [
"def",
"affine_skew",
"(",
"tilt",
",",
"phi",
",",
"img",
",",
"mask",
"=",
"None",
")",
":",
"h",
",",
"w",
"=",
"img",
".",
"shape",
"[",
":",
"2",
"]",
"if",
"mask",
"is",
"None",
":",
"mask",
"=",
"np",
".",
"zeros",
"(",
"(",
"h",
","... | [
36,
0
] | [
65,
24
] | python | en | ['en', 'error', 'th'] | False |
affine_detect | (detector, img, mask=None, pool=None) |
affine_detect(detector, img, mask=None, pool=None) -> keypoints, descrs
Apply a set of affine transformations to the image, detect keypoints and
reproject them into initial image coordinates.
See http://www.ipol.im/pub/algo/my_affine_sift/ for the details.
ThreadPool object may be passed to speed... |
affine_detect(detector, img, mask=None, pool=None) -> keypoints, descrs | def affine_detect(detector, img, mask=None, pool=None):
'''
affine_detect(detector, img, mask=None, pool=None) -> keypoints, descrs
Apply a set of affine transformations to the image, detect keypoints and
reproject them into initial image coordinates.
See http://www.ipol.im/pub/algo/my_affine_sift/... | [
"def",
"affine_detect",
"(",
"detector",
",",
"img",
",",
"mask",
"=",
"None",
",",
"pool",
"=",
"None",
")",
":",
"params",
"=",
"[",
"(",
"1.0",
",",
"0.0",
")",
"]",
"for",
"t",
"in",
"2",
"**",
"(",
"0.5",
"*",
"np",
".",
"arange",
"(",
"... | [
68,
0
] | [
106,
38
] | python | en | ['en', 'error', 'th'] | False |
Order.__init__ | (self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, status: str=None, complete: bool=False) | Order - a model defined in Swagger
:param id: The id of this Order. # noqa: E501
:type id: int
:param pet_id: The pet_id of this Order. # noqa: E501
:type pet_id: int
:param quantity: The quantity of this Order. # noqa: E501
:type quantity: int
:param ship_dat... | Order - a model defined in Swagger | def __init__(self, id: int=None, pet_id: int=None, quantity: int=None, ship_date: datetime=None, status: str=None, complete: bool=False): # noqa: E501
"""Order - a model defined in Swagger
:param id: The id of this Order. # noqa: E501
:type id: int
:param pet_id: The pet_id of this Or... | [
"def",
"__init__",
"(",
"self",
",",
"id",
":",
"int",
"=",
"None",
",",
"pet_id",
":",
"int",
"=",
"None",
",",
"quantity",
":",
"int",
"=",
"None",
",",
"ship_date",
":",
"datetime",
"=",
"None",
",",
"status",
":",
"str",
"=",
"None",
",",
"co... | [
17,
4
] | [
56,
33
] | python | en | ['en', 'en', 'en'] | True |
Order.from_dict | (cls, dikt) | Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The Order of this Order. # noqa: E501
:rtype: Order
| Returns the dict as a model | def from_dict(cls, dikt) -> 'Order':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The Order of this Order. # noqa: E501
:rtype: Order
"""
return util.deserialize_model(dikt, cls) | [
"def",
"from_dict",
"(",
"cls",
",",
"dikt",
")",
"->",
"'Order'",
":",
"return",
"util",
".",
"deserialize_model",
"(",
"dikt",
",",
"cls",
")"
] | [
59,
4
] | [
67,
48
] | python | en | ['en', 'en', 'en'] | True |
Order.id | (self) | Gets the id of this Order.
:return: The id of this Order.
:rtype: int
| Gets the id of this Order. | def id(self) -> int:
"""Gets the id of this Order.
:return: The id of this Order.
:rtype: int
"""
return self._id | [
"def",
"id",
"(",
"self",
")",
"->",
"int",
":",
"return",
"self",
".",
"_id"
] | [
70,
4
] | [
77,
23
] | python | en | ['en', 'en', 'en'] | True |
Order.id | (self, id: int) | Sets the id of this Order.
:param id: The id of this Order.
:type id: int
| Sets the id of this Order. | def id(self, id: int):
"""Sets the id of this Order.
:param id: The id of this Order.
:type id: int
"""
self._id = id | [
"def",
"id",
"(",
"self",
",",
"id",
":",
"int",
")",
":",
"self",
".",
"_id",
"=",
"id"
] | [
80,
4
] | [
88,
21
] | python | en | ['en', 'en', 'en'] | True |
Order.pet_id | (self) | Gets the pet_id of this Order.
:return: The pet_id of this Order.
:rtype: int
| Gets the pet_id of this Order. | def pet_id(self) -> int:
"""Gets the pet_id of this Order.
:return: The pet_id of this Order.
:rtype: int
"""
return self._pet_id | [
"def",
"pet_id",
"(",
"self",
")",
"->",
"int",
":",
"return",
"self",
".",
"_pet_id"
] | [
91,
4
] | [
98,
27
] | python | en | ['en', 'en', 'en'] | True |
Order.pet_id | (self, pet_id: int) | Sets the pet_id of this Order.
:param pet_id: The pet_id of this Order.
:type pet_id: int
| Sets the pet_id of this Order. | def pet_id(self, pet_id: int):
"""Sets the pet_id of this Order.
:param pet_id: The pet_id of this Order.
:type pet_id: int
"""
self._pet_id = pet_id | [
"def",
"pet_id",
"(",
"self",
",",
"pet_id",
":",
"int",
")",
":",
"self",
".",
"_pet_id",
"=",
"pet_id"
] | [
101,
4
] | [
109,
29
] | python | en | ['en', 'en', 'en'] | True |
Order.quantity | (self) | Gets the quantity of this Order.
:return: The quantity of this Order.
:rtype: int
| Gets the quantity of this Order. | def quantity(self) -> int:
"""Gets the quantity of this Order.
:return: The quantity of this Order.
:rtype: int
"""
return self._quantity | [
"def",
"quantity",
"(",
"self",
")",
"->",
"int",
":",
"return",
"self",
".",
"_quantity"
] | [
112,
4
] | [
119,
29
] | python | en | ['en', 'en', 'en'] | True |
Order.quantity | (self, quantity: int) | Sets the quantity of this Order.
:param quantity: The quantity of this Order.
:type quantity: int
| Sets the quantity of this Order. | def quantity(self, quantity: int):
"""Sets the quantity of this Order.
:param quantity: The quantity of this Order.
:type quantity: int
"""
self._quantity = quantity | [
"def",
"quantity",
"(",
"self",
",",
"quantity",
":",
"int",
")",
":",
"self",
".",
"_quantity",
"=",
"quantity"
] | [
122,
4
] | [
130,
33
] | python | en | ['en', 'en', 'en'] | True |
Order.ship_date | (self) | Gets the ship_date of this Order.
:return: The ship_date of this Order.
:rtype: datetime
| Gets the ship_date of this Order. | def ship_date(self) -> datetime:
"""Gets the ship_date of this Order.
:return: The ship_date of this Order.
:rtype: datetime
"""
return self._ship_date | [
"def",
"ship_date",
"(",
"self",
")",
"->",
"datetime",
":",
"return",
"self",
".",
"_ship_date"
] | [
133,
4
] | [
140,
30
] | python | en | ['en', 'en', 'en'] | True |
Order.ship_date | (self, ship_date: datetime) | Sets the ship_date of this Order.
:param ship_date: The ship_date of this Order.
:type ship_date: datetime
| Sets the ship_date of this Order. | def ship_date(self, ship_date: datetime):
"""Sets the ship_date of this Order.
:param ship_date: The ship_date of this Order.
:type ship_date: datetime
"""
self._ship_date = ship_date | [
"def",
"ship_date",
"(",
"self",
",",
"ship_date",
":",
"datetime",
")",
":",
"self",
".",
"_ship_date",
"=",
"ship_date"
] | [
143,
4
] | [
151,
35
] | python | en | ['en', 'en', 'en'] | True |
Order.status | (self) | Gets the status of this Order.
Order Status # noqa: E501
:return: The status of this Order.
:rtype: str
| Gets the status of this Order. | def status(self) -> str:
"""Gets the status of this Order.
Order Status # noqa: E501
:return: The status of this Order.
:rtype: str
"""
return self._status | [
"def",
"status",
"(",
"self",
")",
"->",
"str",
":",
"return",
"self",
".",
"_status"
] | [
154,
4
] | [
162,
27
] | python | en | ['en', 'en', 'en'] | True |
Order.status | (self, status: str) | Sets the status of this Order.
Order Status # noqa: E501
:param status: The status of this Order.
:type status: str
| Sets the status of this Order. | def status(self, status: str):
"""Sets the status of this Order.
Order Status # noqa: E501
:param status: The status of this Order.
:type status: str
"""
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
if status not in allowed_values:
... | [
"def",
"status",
"(",
"self",
",",
"status",
":",
"str",
")",
":",
"allowed_values",
"=",
"[",
"\"placed\"",
",",
"\"approved\"",
",",
"\"delivered\"",
"]",
"# noqa: E501",
"if",
"status",
"not",
"in",
"allowed_values",
":",
"raise",
"ValueError",
"(",
"\"In... | [
165,
4
] | [
180,
29
] | python | en | ['en', 'en', 'en'] | True |
Order.complete | (self) | Gets the complete of this Order.
:return: The complete of this Order.
:rtype: bool
| Gets the complete of this Order. | def complete(self) -> bool:
"""Gets the complete of this Order.
:return: The complete of this Order.
:rtype: bool
"""
return self._complete | [
"def",
"complete",
"(",
"self",
")",
"->",
"bool",
":",
"return",
"self",
".",
"_complete"
] | [
183,
4
] | [
190,
29
] | python | en | ['en', 'en', 'en'] | True |
Order.complete | (self, complete: bool) | Sets the complete of this Order.
:param complete: The complete of this Order.
:type complete: bool
| Sets the complete of this Order. | def complete(self, complete: bool):
"""Sets the complete of this Order.
:param complete: The complete of this Order.
:type complete: bool
"""
self._complete = complete | [
"def",
"complete",
"(",
"self",
",",
"complete",
":",
"bool",
")",
":",
"self",
".",
"_complete",
"=",
"complete"
] | [
193,
4
] | [
201,
33
] | python | en | ['en', 'en', 'en'] | True |
TestStoreController.test_delete_order | (self) | Test case for delete_order
Delete purchase order by ID
| Test case for delete_order | def test_delete_order(self):
"""Test case for delete_order
Delete purchase order by ID
"""
headers = {
}
response = self.client.open(
'/v2/store/order/{order_id}'.format(order_id='order_id_example'),
method='DELETE',
headers=headers)
... | [
"def",
"test_delete_order",
"(",
"self",
")",
":",
"headers",
"=",
"{",
"}",
"response",
"=",
"self",
".",
"client",
".",
"open",
"(",
"'/v2/store/order/{order_id}'",
".",
"format",
"(",
"order_id",
"=",
"'order_id_example'",
")",
",",
"method",
"=",
"'DELET... | [
15,
4
] | [
27,
77
] | python | da | ['da', 'da', 'en'] | True |
TestStoreController.test_get_inventory | (self) | Test case for get_inventory
Returns pet inventories by status
| Test case for get_inventory | def test_get_inventory(self):
"""Test case for get_inventory
Returns pet inventories by status
"""
headers = {
'Accept': 'application/json',
'api_key': 'special-key',
}
response = self.client.open(
'/v2/store/inventory',
m... | [
"def",
"test_get_inventory",
"(",
"self",
")",
":",
"headers",
"=",
"{",
"'Accept'",
":",
"'application/json'",
",",
"'api_key'",
":",
"'special-key'",
",",
"}",
"response",
"=",
"self",
".",
"client",
".",
"open",
"(",
"'/v2/store/inventory'",
",",
"method",
... | [
29,
4
] | [
43,
77
] | python | en | ['en', 'en', 'en'] | True |
TestStoreController.test_get_order_by_id | (self) | Test case for get_order_by_id
Find purchase order by ID
| Test case for get_order_by_id | def test_get_order_by_id(self):
"""Test case for get_order_by_id
Find purchase order by ID
"""
headers = {
'Accept': 'application/json',
}
response = self.client.open(
'/v2/store/order/{order_id}'.format(order_id=5),
method='GET',
... | [
"def",
"test_get_order_by_id",
"(",
"self",
")",
":",
"headers",
"=",
"{",
"'Accept'",
":",
"'application/json'",
",",
"}",
"response",
"=",
"self",
".",
"client",
".",
"open",
"(",
"'/v2/store/order/{order_id}'",
".",
"format",
"(",
"order_id",
"=",
"5",
")... | [
45,
4
] | [
58,
77
] | python | en | ['da', 'en', 'en'] | True |
TestStoreController.test_place_order | (self) | Test case for place_order
Place an order for a pet
| Test case for place_order | def test_place_order(self):
"""Test case for place_order
Place an order for a pet
"""
order = {
"petId" : 6,
"quantity" : 1,
"id" : 0,
"shipDate" : "2000-01-23T04:56:07.000+00:00",
"complete" : false,
"status" : "placed"
}
headers = {
'Accept': 'applicat... | [
"def",
"test_place_order",
"(",
"self",
")",
":",
"order",
"=",
"{",
"\"petId\"",
":",
"6",
",",
"\"quantity\"",
":",
"1",
",",
"\"id\"",
":",
"0",
",",
"\"shipDate\"",
":",
"\"2000-01-23T04:56:07.000+00:00\"",
",",
"\"complete\"",
":",
"false",
",",
"\"stat... | [
60,
4
] | [
84,
77
] | python | en | ['en', 'en', 'en'] | True |
TestTypeHolderDefault.testTypeHolderDefault | (self) | Test TypeHolderDefault | Test TypeHolderDefault | def testTypeHolderDefault(self):
"""Test TypeHolderDefault"""
# required_vars are set to None now until swagger-parser/swagger-core fixes
# https://github.com/swagger-api/swagger-parser/issues/971
required_vars = ['number_item', 'integer_item', 'array_item']
sample_values = [5.67... | [
"def",
"testTypeHolderDefault",
"(",
"self",
")",
":",
"# required_vars are set to None now until swagger-parser/swagger-core fixes",
"# https://github.com/swagger-api/swagger-parser/issues/971",
"required_vars",
"=",
"[",
"'number_item'",
",",
"'integer_item'",
",",
"'array_item'",
... | [
30,
4
] | [
44,
47
] | python | en | ['en', 'no', 'en'] | False |
noto_checkout_master | (dry_run=False) | Check out the noto repos at master. Return True if ok, else log
error and return False. | Check out the noto repos at master. Return True if ok, else log
error and return False. | def noto_checkout_master(dry_run=False):
"""Check out the noto repos at master. Return True if ok, else log
error and return False."""
if not noto_check_clean():
return False
if not dry_run:
for p in _REPO_PATHS:
tool_utils.git_checkout(p, "master")
else:
print... | [
"def",
"noto_checkout_master",
"(",
"dry_run",
"=",
"False",
")",
":",
"if",
"not",
"noto_check_clean",
"(",
")",
":",
"return",
"False",
"if",
"not",
"dry_run",
":",
"for",
"p",
"in",
"_REPO_PATHS",
":",
"tool_utils",
".",
"git_checkout",
"(",
"p",
",",
... | [
50,
0
] | [
63,
15
] | python | en | ['en', 'en', 'en'] | True |
noto_checkout | (
fonts_tag="latest",
emoji_tag="latest",
cjk_tag="latest",
verbose=True,
dry_run=False,
) | Check out the noto repos at the provided tags. Return True if ok,
else log error and return False. Default is 'latest' for the latest
tag. | Check out the noto repos at the provided tags. Return True if ok,
else log error and return False. Default is 'latest' for the latest
tag. | def noto_checkout(
fonts_tag="latest",
emoji_tag="latest",
cjk_tag="latest",
verbose=True,
dry_run=False,
):
"""Check out the noto repos at the provided tags. Return True if ok,
else log error and return False. Default is 'latest' for the latest
tag."""
if not noto_check_clean():
... | [
"def",
"noto_checkout",
"(",
"fonts_tag",
"=",
"\"latest\"",
",",
"emoji_tag",
"=",
"\"latest\"",
",",
"cjk_tag",
"=",
"\"latest\"",
",",
"verbose",
"=",
"True",
",",
"dry_run",
"=",
"False",
",",
")",
":",
"if",
"not",
"noto_check_clean",
"(",
")",
":",
... | [
66,
0
] | [
111,
15
] | python | en | ['en', 'en', 'en'] | True |
check_translations_directory_name | (integration: Integration) | Check that the correct name is used for the translations directory. | Check that the correct name is used for the translations directory. | def check_translations_directory_name(integration: Integration) -> None:
"""Check that the correct name is used for the translations directory."""
legacy_translations = integration.path / ".translations"
translations = integration.path / "translations"
if translations.is_dir():
# No action requ... | [
"def",
"check_translations_directory_name",
"(",
"integration",
":",
"Integration",
")",
"->",
"None",
":",
"legacy_translations",
"=",
"integration",
".",
"path",
"/",
"\".translations\"",
"translations",
"=",
"integration",
".",
"path",
"/",
"\"translations\"",
"if"... | [
51,
0
] | [
61,
79
] | python | en | ['en', 'en', 'en'] | True |
find_references | (strings, prefix, found) | Find references. | Find references. | def find_references(strings, prefix, found):
"""Find references."""
for key, value in strings.items():
if isinstance(value, dict):
find_references(value, f"{prefix}::{key}", found)
continue
match = re.match(RE_REFERENCE, value)
if match:
found.append... | [
"def",
"find_references",
"(",
"strings",
",",
"prefix",
",",
"found",
")",
":",
"for",
"key",
",",
"value",
"in",
"strings",
".",
"items",
"(",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"dict",
")",
":",
"find_references",
"(",
"value",
",",
... | [
64,
0
] | [
74,
82
] | python | en | ['en', 'da', 'en'] | False |
removed_title_validator | (config, integration, value) | Mark removed title. | Mark removed title. | def removed_title_validator(config, integration, value):
"""Mark removed title."""
if not config.specific_integrations:
raise vol.Invalid(REMOVED_TITLE_MSG)
# Don't mark it as an error yet for custom components to allow backwards compat.
integration.add_warning("translations", REMOVED_TITLE_MSG... | [
"def",
"removed_title_validator",
"(",
"config",
",",
"integration",
",",
"value",
")",
":",
"if",
"not",
"config",
".",
"specific_integrations",
":",
"raise",
"vol",
".",
"Invalid",
"(",
"REMOVED_TITLE_MSG",
")",
"# Don't mark it as an error yet for custom components t... | [
77,
0
] | [
84,
16
] | python | en | ['en', 'en', 'en'] | True |
lowercase_validator | (value) | Validate value is lowercase. | Validate value is lowercase. | def lowercase_validator(value):
"""Validate value is lowercase."""
if value.lower() != value:
raise vol.Invalid("Needs to be lowercase")
return value | [
"def",
"lowercase_validator",
"(",
"value",
")",
":",
"if",
"value",
".",
"lower",
"(",
")",
"!=",
"value",
":",
"raise",
"vol",
".",
"Invalid",
"(",
"\"Needs to be lowercase\"",
")",
"return",
"value"
] | [
87,
0
] | [
92,
16
] | python | en | ['en', 'en', 'en'] | True |
gen_data_entry_schema | (
*,
config: Config,
integration: Integration,
flow_title: int,
require_step_title: bool,
) | Generate a data entry schema. | Generate a data entry schema. | def gen_data_entry_schema(
*,
config: Config,
integration: Integration,
flow_title: int,
require_step_title: bool,
):
"""Generate a data entry schema."""
step_title_class = vol.Required if require_step_title else vol.Optional
schema = {
vol.Optional("flow_title"): cv.string_with_... | [
"def",
"gen_data_entry_schema",
"(",
"*",
",",
"config",
":",
"Config",
",",
"integration",
":",
"Integration",
",",
"flow_title",
":",
"int",
",",
"require_step_title",
":",
"bool",
",",
")",
":",
"step_title_class",
"=",
"vol",
".",
"Required",
"if",
"requ... | [
95,
0
] | [
125,
17
] | python | en | ['en', 'de', 'en'] | True |
gen_strings_schema | (config: Config, integration: Integration) | Generate a strings schema. | Generate a strings schema. | def gen_strings_schema(config: Config, integration: Integration):
"""Generate a strings schema."""
return vol.Schema(
{
vol.Optional("title"): cv.string_with_no_html,
vol.Optional("config"): gen_data_entry_schema(
config=config,
integration=integra... | [
"def",
"gen_strings_schema",
"(",
"config",
":",
"Config",
",",
"integration",
":",
"Integration",
")",
":",
"return",
"vol",
".",
"Schema",
"(",
"{",
"vol",
".",
"Optional",
"(",
"\"title\"",
")",
":",
"cv",
".",
"string_with_no_html",
",",
"vol",
".",
... | [
128,
0
] | [
165,
5
] | python | co | ['en', 'co', 'it'] | False |
gen_auth_schema | (config: Config, integration: Integration) | Generate auth schema. | Generate auth schema. | def gen_auth_schema(config: Config, integration: Integration):
"""Generate auth schema."""
return vol.Schema(
{
vol.Optional("mfa_setup"): {
str: gen_data_entry_schema(
config=config,
integration=integration,
flow_ti... | [
"def",
"gen_auth_schema",
"(",
"config",
":",
"Config",
",",
"integration",
":",
"Integration",
")",
":",
"return",
"vol",
".",
"Schema",
"(",
"{",
"vol",
".",
"Optional",
"(",
"\"mfa_setup\"",
")",
":",
"{",
"str",
":",
"gen_data_entry_schema",
"(",
"conf... | [
168,
0
] | [
181,
5
] | python | de | ['de', 'de', 'it'] | True |
gen_platform_strings_schema | (config: Config, integration: Integration) | Generate platform strings schema like strings.sensor.json.
Example of valid data:
{
"state": {
"moon__phase": {
"full": "Full"
}
}
}
| Generate platform strings schema like strings.sensor.json. | def gen_platform_strings_schema(config: Config, integration: Integration):
"""Generate platform strings schema like strings.sensor.json.
Example of valid data:
{
"state": {
"moon__phase": {
"full": "Full"
}
}
}
"""
def device_class_valida... | [
"def",
"gen_platform_strings_schema",
"(",
"config",
":",
"Config",
",",
"integration",
":",
"Integration",
")",
":",
"def",
"device_class_validator",
"(",
"value",
")",
":",
"\"\"\"Key validator for platorm states.\n\n Platform states are only allowed to provide states fo... | [
184,
0
] | [
224,
5
] | python | en | ['nl', 'fy', 'en'] | False |
validate_translation_file | (config: Config, integration: Integration, all_strings) | Validate translation files for integration. | Validate translation files for integration. | def validate_translation_file(config: Config, integration: Integration, all_strings):
"""Validate translation files for integration."""
if config.specific_integrations:
check_translations_directory_name(integration)
strings_files = [integration.path / "strings.json"]
# Also validate translatio... | [
"def",
"validate_translation_file",
"(",
"config",
":",
"Config",
",",
"integration",
":",
"Integration",
",",
"all_strings",
")",
":",
"if",
"config",
".",
"specific_integrations",
":",
"check_translations_directory_name",
"(",
"integration",
")",
"strings_files",
"=... | [
230,
0
] | [
329,
13
] | python | en | ['en', 'da', 'en'] | True |
validate | (integrations: dict[str, Integration], config: Config) | Handle JSON files inside integrations. | Handle JSON files inside integrations. | def validate(integrations: dict[str, Integration], config: Config):
"""Handle JSON files inside integrations."""
if config.specific_integrations:
all_strings = None
else:
all_strings = upload.generate_upload_data()
for integration in integrations.values():
validate_translation_f... | [
"def",
"validate",
"(",
"integrations",
":",
"dict",
"[",
"str",
",",
"Integration",
"]",
",",
"config",
":",
"Config",
")",
":",
"if",
"config",
".",
"specific_integrations",
":",
"all_strings",
"=",
"None",
"else",
":",
"all_strings",
"=",
"upload",
".",... | [
332,
0
] | [
340,
67
] | python | en | ['en', 'da', 'en'] | True |
async_setup_platform | (hass, config, async_add_entities, discovery_info=None) | Set up the sensors. | Set up the sensors. | async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the sensors."""
if discovery_info is None:
return
name = hass.data[DOMAIN]["name"]
state_proxy = hass.data[DOMAIN]["state_proxy"]
async_add_entities(
[
description.sensor_ty... | [
"async",
"def",
"async_setup_platform",
"(",
"hass",
",",
"config",
",",
"async_add_entities",
",",
"discovery_info",
"=",
"None",
")",
":",
"if",
"discovery_info",
"is",
"None",
":",
"return",
"name",
"=",
"hass",
".",
"data",
"[",
"DOMAIN",
"]",
"[",
"\"... | [
237,
0
] | [
251,
5
] | python | en | ['en', 'bg', 'en'] | True |
ValloxSensor.__init__ | (
self,
name: str,
state_proxy: ValloxStateProxy,
description: ValloxSensorEntityDescription,
) | Initialize the Vallox sensor. | Initialize the Vallox sensor. | def __init__(
self,
name: str,
state_proxy: ValloxStateProxy,
description: ValloxSensorEntityDescription,
) -> None:
"""Initialize the Vallox sensor."""
self._state_proxy = state_proxy
self.entity_description = description
self._attr_name = f"{name} ... | [
"def",
"__init__",
"(",
"self",
",",
"name",
":",
"str",
",",
"state_proxy",
":",
"ValloxStateProxy",
",",
"description",
":",
"ValloxSensorEntityDescription",
",",
")",
"->",
"None",
":",
"self",
".",
"_state_proxy",
"=",
"state_proxy",
"self",
".",
"entity_d... | [
36,
4
] | [
48,
36
] | python | en | ['en', 'sq', 'en'] | True |
ValloxSensor.async_added_to_hass | (self) | Call to update. | Call to update. | async def async_added_to_hass(self):
"""Call to update."""
self.async_on_remove(
async_dispatcher_connect(
self.hass, SIGNAL_VALLOX_STATE_UPDATE, self._update_callback
)
) | [
"async",
"def",
"async_added_to_hass",
"(",
"self",
")",
":",
"self",
".",
"async_on_remove",
"(",
"async_dispatcher_connect",
"(",
"self",
".",
"hass",
",",
"SIGNAL_VALLOX_STATE_UPDATE",
",",
"self",
".",
"_update_callback",
")",
")"
] | [
50,
4
] | [
56,
9
] | python | en | ['en', 'en', 'en'] | True |
ValloxSensor._update_callback | (self) | Call update method. | Call update method. | def _update_callback(self):
"""Call update method."""
self.async_schedule_update_ha_state(True) | [
"def",
"_update_callback",
"(",
"self",
")",
":",
"self",
".",
"async_schedule_update_ha_state",
"(",
"True",
")"
] | [
59,
4
] | [
61,
49
] | python | en | ['en', 'sn', 'en'] | True |
ValloxSensor.async_update | (self) | Fetch state from the ventilation unit. | Fetch state from the ventilation unit. | async def async_update(self):
"""Fetch state from the ventilation unit."""
try:
self._attr_native_value = self._state_proxy.fetch_metric(
self.entity_description.metric_key
)
except (OSError, KeyError) as err:
self._attr_available = False
... | [
"async",
"def",
"async_update",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"_attr_native_value",
"=",
"self",
".",
"_state_proxy",
".",
"fetch_metric",
"(",
"self",
".",
"entity_description",
".",
"metric_key",
")",
"except",
"(",
"OSError",
",",
"KeyEr... | [
63,
4
] | [
75,
35
] | python | en | ['en', 'en', 'en'] | True |
ValloxProfileSensor.async_update | (self) | Fetch state from the ventilation unit. | Fetch state from the ventilation unit. | async def async_update(self):
"""Fetch state from the ventilation unit."""
try:
self._attr_native_value = self._state_proxy.get_profile()
except OSError as err:
self._attr_available = False
_LOGGER.error("Error updating sensor: %s", err)
return
... | [
"async",
"def",
"async_update",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"_attr_native_value",
"=",
"self",
".",
"_state_proxy",
".",
"get_profile",
"(",
")",
"except",
"OSError",
"as",
"err",
":",
"self",
".",
"_attr_available",
"=",
"False",
"_LOG... | [
81,
4
] | [
91,
35
] | python | en | ['en', 'en', 'en'] | True |
ValloxFanSpeedSensor.async_update | (self) | Fetch state from the ventilation unit. | Fetch state from the ventilation unit. | async def async_update(self):
"""Fetch state from the ventilation unit."""
try:
fan_on = self._state_proxy.fetch_metric(METRIC_KEY_MODE) == MODE_ON
except (OSError, KeyError) as err:
self._attr_available = False
_LOGGER.error("Error updating sensor: %s", err)... | [
"async",
"def",
"async_update",
"(",
"self",
")",
":",
"try",
":",
"fan_on",
"=",
"self",
".",
"_state_proxy",
".",
"fetch_metric",
"(",
"METRIC_KEY_MODE",
")",
"==",
"MODE_ON",
"except",
"(",
"OSError",
",",
"KeyError",
")",
"as",
"err",
":",
"self",
".... | [
104,
4
] | [
119,
39
] | python | en | ['en', 'en', 'en'] | True |
ValloxFilterRemainingSensor.async_update | (self) | Fetch state from the ventilation unit. | Fetch state from the ventilation unit. | async def async_update(self):
"""Fetch state from the ventilation unit."""
try:
days_remaining = int(
self._state_proxy.fetch_metric(self.entity_description.metric_key)
)
except (OSError, KeyError) as err:
self._attr_available = False
... | [
"async",
"def",
"async_update",
"(",
"self",
")",
":",
"try",
":",
"days_remaining",
"=",
"int",
"(",
"self",
".",
"_state_proxy",
".",
"fetch_metric",
"(",
"self",
".",
"entity_description",
".",
"metric_key",
")",
")",
"except",
"(",
"OSError",
",",
"Key... | [
125,
4
] | [
144,
35
] | python | en | ['en', 'en', 'en'] | True |
test_default_state | (hass) | Test light switch default state. | Test light switch default state. | async def test_default_state(hass):
"""Test light switch default state."""
await async_setup_component(
hass,
"light",
{
"light": {
"platform": "switch",
"entity_id": "switch.test",
"name": "Christmas Tree Lights",
}... | [
"async",
"def",
"test_default_state",
"(",
"hass",
")",
":",
"await",
"async_setup_component",
"(",
"hass",
",",
"\"light\"",
",",
"{",
"\"light\"",
":",
"{",
"\"platform\"",
":",
"\"switch\"",
",",
"\"entity_id\"",
":",
"\"switch.test\"",
",",
"\"name\"",
":",
... | [
8,
0
] | [
32,
49
] | python | en | ['de', 'en', 'en'] | True |
test_light_service_calls | (hass) | Test service calls to light. | Test service calls to light. | async def test_light_service_calls(hass):
"""Test service calls to light."""
await async_setup_component(hass, "switch", {"switch": [{"platform": "demo"}]})
await async_setup_component(
hass,
"light",
{"light": [{"platform": "switch", "entity_id": "switch.decorative_lights"}]},
)... | [
"async",
"def",
"test_light_service_calls",
"(",
"hass",
")",
":",
"await",
"async_setup_component",
"(",
"hass",
",",
"\"switch\"",
",",
"{",
"\"switch\"",
":",
"[",
"{",
"\"platform\"",
":",
"\"demo\"",
"}",
"]",
"}",
")",
"await",
"async_setup_component",
"... | [
35,
0
] | [
61,
63
] | python | en | ['en', 'en', 'en'] | True |
test_switch_service_calls | (hass) | Test service calls to switch. | Test service calls to switch. | async def test_switch_service_calls(hass):
"""Test service calls to switch."""
await async_setup_component(hass, "switch", {"switch": [{"platform": "demo"}]})
await async_setup_component(
hass,
"light",
{"light": [{"platform": "switch", "entity_id": "switch.decorative_lights"}]},
... | [
"async",
"def",
"test_switch_service_calls",
"(",
"hass",
")",
":",
"await",
"async_setup_component",
"(",
"hass",
",",
"\"switch\"",
",",
"{",
"\"switch\"",
":",
"[",
"{",
"\"platform\"",
":",
"\"demo\"",
"}",
"]",
"}",
")",
"await",
"async_setup_component",
... | [
64,
0
] | [
86,
62
] | python | en | ['en', 'en', 'en'] | True |
async_setup_entry | (hass, config_entry, async_add_entities) | Set up climate for a Nexia device. | Set up climate for a Nexia device. | async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up climate for a Nexia device."""
nexia_data = hass.data[DOMAIN][config_entry.entry_id]
nexia_home = nexia_data[NEXIA_DEVICE]
coordinator = nexia_data[UPDATE_COORDINATOR]
platform = entity_platform.async_get_current_platfo... | [
"async",
"def",
"async_setup_entry",
"(",
"hass",
",",
"config_entry",
",",
"async_add_entities",
")",
":",
"nexia_data",
"=",
"hass",
".",
"data",
"[",
"DOMAIN",
"]",
"[",
"config_entry",
".",
"entry_id",
"]",
"nexia_home",
"=",
"nexia_data",
"[",
"NEXIA_DEVI... | [
90,
0
] | [
115,
38
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.__init__ | (self, coordinator, zone) | Initialize the thermostat. | Initialize the thermostat. | def __init__(self, coordinator, zone):
"""Initialize the thermostat."""
super().__init__(
coordinator, zone, name=zone.get_name(), unique_id=zone.zone_id
)
self._undo_humidfy_dispatcher = None
self._undo_aircleaner_dispatcher = None
# The has_* calls are stabl... | [
"def",
"__init__",
"(",
"self",
",",
"coordinator",
",",
"zone",
")",
":",
"super",
"(",
")",
".",
"__init__",
"(",
"coordinator",
",",
"zone",
",",
"name",
"=",
"zone",
".",
"get_name",
"(",
")",
",",
"unique_id",
"=",
"zone",
".",
"zone_id",
")",
... | [
121,
4
] | [
133,
80
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.supported_features | (self) | Return the list of supported features. | Return the list of supported features. | def supported_features(self):
"""Return the list of supported features."""
supported = (
SUPPORT_TARGET_TEMPERATURE_RANGE
| SUPPORT_TARGET_TEMPERATURE
| SUPPORT_FAN_MODE
| SUPPORT_PRESET_MODE
)
if self._has_humidify_support or self._has_de... | [
"def",
"supported_features",
"(",
"self",
")",
":",
"supported",
"=",
"(",
"SUPPORT_TARGET_TEMPERATURE_RANGE",
"|",
"SUPPORT_TARGET_TEMPERATURE",
"|",
"SUPPORT_FAN_MODE",
"|",
"SUPPORT_PRESET_MODE",
")",
"if",
"self",
".",
"_has_humidify_support",
"or",
"self",
".",
"... | [
136,
4
] | [
151,
24
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.is_fan_on | (self) | Blower is on. | Blower is on. | def is_fan_on(self):
"""Blower is on."""
return self._thermostat.is_blower_active() | [
"def",
"is_fan_on",
"(",
"self",
")",
":",
"return",
"self",
".",
"_thermostat",
".",
"is_blower_active",
"(",
")"
] | [
154,
4
] | [
156,
50
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.temperature_unit | (self) | Return the unit of measurement. | Return the unit of measurement. | def temperature_unit(self):
"""Return the unit of measurement."""
return TEMP_CELSIUS if self._thermostat.get_unit() == "C" else TEMP_FAHRENHEIT | [
"def",
"temperature_unit",
"(",
"self",
")",
":",
"return",
"TEMP_CELSIUS",
"if",
"self",
".",
"_thermostat",
".",
"get_unit",
"(",
")",
"==",
"\"C\"",
"else",
"TEMP_FAHRENHEIT"
] | [
159,
4
] | [
161,
86
] | python | en | ['en', 'la', 'en'] | True |
NexiaZone.current_temperature | (self) | Return the current temperature. | Return the current temperature. | def current_temperature(self):
"""Return the current temperature."""
return self._zone.get_temperature() | [
"def",
"current_temperature",
"(",
"self",
")",
":",
"return",
"self",
".",
"_zone",
".",
"get_temperature",
"(",
")"
] | [
164,
4
] | [
166,
43
] | python | en | ['en', 'la', 'en'] | True |
NexiaZone.fan_mode | (self) | Return the fan setting. | Return the fan setting. | def fan_mode(self):
"""Return the fan setting."""
return self._thermostat.get_fan_mode() | [
"def",
"fan_mode",
"(",
"self",
")",
":",
"return",
"self",
".",
"_thermostat",
".",
"get_fan_mode",
"(",
")"
] | [
169,
4
] | [
171,
46
] | python | en | ['en', 'fy', 'en'] | True |
NexiaZone.fan_modes | (self) | Return the list of available fan modes. | Return the list of available fan modes. | def fan_modes(self):
"""Return the list of available fan modes."""
return self._thermostat.get_fan_modes() | [
"def",
"fan_modes",
"(",
"self",
")",
":",
"return",
"self",
".",
"_thermostat",
".",
"get_fan_modes",
"(",
")"
] | [
174,
4
] | [
176,
47
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.min_temp | (self) | Minimum temp for the current setting. | Minimum temp for the current setting. | def min_temp(self):
"""Minimum temp for the current setting."""
return (self._thermostat.get_setpoint_limits())[0] | [
"def",
"min_temp",
"(",
"self",
")",
":",
"return",
"(",
"self",
".",
"_thermostat",
".",
"get_setpoint_limits",
"(",
")",
")",
"[",
"0",
"]"
] | [
179,
4
] | [
181,
58
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.max_temp | (self) | Maximum temp for the current setting. | Maximum temp for the current setting. | def max_temp(self):
"""Maximum temp for the current setting."""
return (self._thermostat.get_setpoint_limits())[1] | [
"def",
"max_temp",
"(",
"self",
")",
":",
"return",
"(",
"self",
".",
"_thermostat",
".",
"get_setpoint_limits",
"(",
")",
")",
"[",
"1",
"]"
] | [
184,
4
] | [
186,
58
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.set_fan_mode | (self, fan_mode) | Set new target fan mode. | Set new target fan mode. | def set_fan_mode(self, fan_mode):
"""Set new target fan mode."""
self._thermostat.set_fan_mode(fan_mode)
self._signal_thermostat_update() | [
"def",
"set_fan_mode",
"(",
"self",
",",
"fan_mode",
")",
":",
"self",
".",
"_thermostat",
".",
"set_fan_mode",
"(",
"fan_mode",
")",
"self",
".",
"_signal_thermostat_update",
"(",
")"
] | [
188,
4
] | [
191,
40
] | python | en | ['sv', 'fy', 'en'] | False |
NexiaZone.preset_mode | (self) | Preset that is active. | Preset that is active. | def preset_mode(self):
"""Preset that is active."""
return self._zone.get_preset() | [
"def",
"preset_mode",
"(",
"self",
")",
":",
"return",
"self",
".",
"_zone",
".",
"get_preset",
"(",
")"
] | [
194,
4
] | [
196,
38
] | python | en | ['en', 'nl', 'en'] | True |
NexiaZone.preset_modes | (self) | All presets. | All presets. | def preset_modes(self):
"""All presets."""
return self._zone.get_presets() | [
"def",
"preset_modes",
"(",
"self",
")",
":",
"return",
"self",
".",
"_zone",
".",
"get_presets",
"(",
")"
] | [
199,
4
] | [
201,
39
] | python | en | ['en', 'en', 'en'] | False |
NexiaZone.set_humidity | (self, humidity) | Dehumidify target. | Dehumidify target. | def set_humidity(self, humidity):
"""Dehumidify target."""
if self._thermostat.has_dehumidify_support():
self._thermostat.set_dehumidify_setpoint(humidity / 100.0)
else:
self._thermostat.set_humidify_setpoint(humidity / 100.0)
self._signal_thermostat_update() | [
"def",
"set_humidity",
"(",
"self",
",",
"humidity",
")",
":",
"if",
"self",
".",
"_thermostat",
".",
"has_dehumidify_support",
"(",
")",
":",
"self",
".",
"_thermostat",
".",
"set_dehumidify_setpoint",
"(",
"humidity",
"/",
"100.0",
")",
"else",
":",
"self"... | [
203,
4
] | [
209,
40
] | python | en | ['en', 'mg', 'sw'] | False |
NexiaZone.target_humidity | (self) | Humidity indoors setpoint. | Humidity indoors setpoint. | def target_humidity(self):
"""Humidity indoors setpoint."""
if self._has_dehumidify_support:
return percent_conv(self._thermostat.get_dehumidify_setpoint())
if self._has_humidify_support:
return percent_conv(self._thermostat.get_humidify_setpoint())
return None | [
"def",
"target_humidity",
"(",
"self",
")",
":",
"if",
"self",
".",
"_has_dehumidify_support",
":",
"return",
"percent_conv",
"(",
"self",
".",
"_thermostat",
".",
"get_dehumidify_setpoint",
"(",
")",
")",
"if",
"self",
".",
"_has_humidify_support",
":",
"return... | [
212,
4
] | [
218,
19
] | python | en | ['en', 'et', 'en'] | True |
NexiaZone.current_humidity | (self) | Humidity indoors. | Humidity indoors. | def current_humidity(self):
"""Humidity indoors."""
if self._has_relative_humidity:
return percent_conv(self._thermostat.get_relative_humidity())
return None | [
"def",
"current_humidity",
"(",
"self",
")",
":",
"if",
"self",
".",
"_has_relative_humidity",
":",
"return",
"percent_conv",
"(",
"self",
".",
"_thermostat",
".",
"get_relative_humidity",
"(",
")",
")",
"return",
"None"
] | [
221,
4
] | [
225,
19
] | python | en | ['en', 'so', 'en'] | False |
NexiaZone.target_temperature | (self) | Temperature we try to reach. | Temperature we try to reach. | def target_temperature(self):
"""Temperature we try to reach."""
current_mode = self._zone.get_current_mode()
if current_mode == OPERATION_MODE_COOL:
return self._zone.get_cooling_setpoint()
if current_mode == OPERATION_MODE_HEAT:
return self._zone.get_heating_se... | [
"def",
"target_temperature",
"(",
"self",
")",
":",
"current_mode",
"=",
"self",
".",
"_zone",
".",
"get_current_mode",
"(",
")",
"if",
"current_mode",
"==",
"OPERATION_MODE_COOL",
":",
"return",
"self",
".",
"_zone",
".",
"get_cooling_setpoint",
"(",
")",
"if... | [
228,
4
] | [
236,
19
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.target_temperature_step | (self) | Step size of temperature units. | Step size of temperature units. | def target_temperature_step(self):
"""Step size of temperature units."""
if self._thermostat.get_unit() == UNIT_FAHRENHEIT:
return 1.0
return 0.5 | [
"def",
"target_temperature_step",
"(",
"self",
")",
":",
"if",
"self",
".",
"_thermostat",
".",
"get_unit",
"(",
")",
"==",
"UNIT_FAHRENHEIT",
":",
"return",
"1.0",
"return",
"0.5"
] | [
239,
4
] | [
243,
18
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.target_temperature_high | (self) | Highest temperature we are trying to reach. | Highest temperature we are trying to reach. | def target_temperature_high(self):
"""Highest temperature we are trying to reach."""
current_mode = self._zone.get_current_mode()
if current_mode in (OPERATION_MODE_COOL, OPERATION_MODE_HEAT):
return None
return self._zone.get_cooling_setpoint() | [
"def",
"target_temperature_high",
"(",
"self",
")",
":",
"current_mode",
"=",
"self",
".",
"_zone",
".",
"get_current_mode",
"(",
")",
"if",
"current_mode",
"in",
"(",
"OPERATION_MODE_COOL",
",",
"OPERATION_MODE_HEAT",
")",
":",
"return",
"None",
"return",
"self... | [
246,
4
] | [
252,
48
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.target_temperature_low | (self) | Lowest temperature we are trying to reach. | Lowest temperature we are trying to reach. | def target_temperature_low(self):
"""Lowest temperature we are trying to reach."""
current_mode = self._zone.get_current_mode()
if current_mode in (OPERATION_MODE_COOL, OPERATION_MODE_HEAT):
return None
return self._zone.get_heating_setpoint() | [
"def",
"target_temperature_low",
"(",
"self",
")",
":",
"current_mode",
"=",
"self",
".",
"_zone",
".",
"get_current_mode",
"(",
")",
"if",
"current_mode",
"in",
"(",
"OPERATION_MODE_COOL",
",",
"OPERATION_MODE_HEAT",
")",
":",
"return",
"None",
"return",
"self"... | [
255,
4
] | [
261,
48
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.hvac_action | (self) | Operation ie. heat, cool, idle. | Operation ie. heat, cool, idle. | def hvac_action(self) -> str:
"""Operation ie. heat, cool, idle."""
system_status = self._thermostat.get_system_status()
zone_called = self._zone.is_calling()
if self._zone.get_requested_mode() == OPERATION_MODE_OFF:
return CURRENT_HVAC_OFF
if not zone_called:
... | [
"def",
"hvac_action",
"(",
"self",
")",
"->",
"str",
":",
"system_status",
"=",
"self",
".",
"_thermostat",
".",
"get_system_status",
"(",
")",
"zone_called",
"=",
"self",
".",
"_zone",
".",
"is_calling",
"(",
")",
"if",
"self",
".",
"_zone",
".",
"get_r... | [
264,
4
] | [
279,
32
] | python | en | ['lv', 'en', 'en'] | True |
NexiaZone.hvac_mode | (self) | Return current mode, as the user-visible name. | Return current mode, as the user-visible name. | def hvac_mode(self):
"""Return current mode, as the user-visible name."""
mode = self._zone.get_requested_mode()
hold = self._zone.is_in_permanent_hold()
# If the device is in hold mode with
# OPERATION_MODE_AUTO
# overriding the schedule by still
# heating and c... | [
"def",
"hvac_mode",
"(",
"self",
")",
":",
"mode",
"=",
"self",
".",
"_zone",
".",
"get_requested_mode",
"(",
")",
"hold",
"=",
"self",
".",
"_zone",
".",
"is_in_permanent_hold",
"(",
")",
"# If the device is in hold mode with",
"# OPERATION_MODE_AUTO",
"# overrid... | [
282,
4
] | [
295,
46
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.hvac_modes | (self) | List of HVAC available modes. | List of HVAC available modes. | def hvac_modes(self):
"""List of HVAC available modes."""
return [
HVAC_MODE_OFF,
HVAC_MODE_AUTO,
HVAC_MODE_HEAT_COOL,
HVAC_MODE_HEAT,
HVAC_MODE_COOL,
] | [
"def",
"hvac_modes",
"(",
"self",
")",
":",
"return",
"[",
"HVAC_MODE_OFF",
",",
"HVAC_MODE_AUTO",
",",
"HVAC_MODE_HEAT_COOL",
",",
"HVAC_MODE_HEAT",
",",
"HVAC_MODE_COOL",
",",
"]"
] | [
298,
4
] | [
306,
9
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.set_temperature | (self, **kwargs) | Set target temperature. | Set target temperature. | def set_temperature(self, **kwargs):
"""Set target temperature."""
new_heat_temp = kwargs.get(ATTR_TARGET_TEMP_LOW)
new_cool_temp = kwargs.get(ATTR_TARGET_TEMP_HIGH)
set_temp = kwargs.get(ATTR_TEMPERATURE)
deadband = self._thermostat.get_deadband()
cur_cool_temp = self._... | [
"def",
"set_temperature",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"new_heat_temp",
"=",
"kwargs",
".",
"get",
"(",
"ATTR_TARGET_TEMP_LOW",
")",
"new_cool_temp",
"=",
"kwargs",
".",
"get",
"(",
"ATTR_TARGET_TEMP_HIGH",
")",
"set_temp",
"=",
"kwargs",
... | [
308,
4
] | [
345,
34
] | python | en | ['en', 'la', 'en'] | True |
NexiaZone.is_aux_heat | (self) | Emergency heat state. | Emergency heat state. | def is_aux_heat(self):
"""Emergency heat state."""
return self._thermostat.is_emergency_heat_active() | [
"def",
"is_aux_heat",
"(",
"self",
")",
":",
"return",
"self",
".",
"_thermostat",
".",
"is_emergency_heat_active",
"(",
")"
] | [
348,
4
] | [
350,
58
] | python | en | ['en', 'ig', 'en'] | True |
NexiaZone.extra_state_attributes | (self) | Return the device specific state attributes. | Return the device specific state attributes. | def extra_state_attributes(self):
"""Return the device specific state attributes."""
data = super().extra_state_attributes
data[ATTR_ZONE_STATUS] = self._zone.get_status()
if not self._has_relative_humidity:
return data
min_humidity = percent_conv(self._thermostat.... | [
"def",
"extra_state_attributes",
"(",
"self",
")",
":",
"data",
"=",
"super",
"(",
")",
".",
"extra_state_attributes",
"data",
"[",
"ATTR_ZONE_STATUS",
"]",
"=",
"self",
".",
"_zone",
".",
"get_status",
"(",
")",
"if",
"not",
"self",
".",
"_has_relative_humi... | [
353,
4
] | [
383,
19
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.set_preset_mode | (self, preset_mode: str) | Set the preset mode. | Set the preset mode. | def set_preset_mode(self, preset_mode: str):
"""Set the preset mode."""
self._zone.set_preset(preset_mode)
self._signal_zone_update() | [
"def",
"set_preset_mode",
"(",
"self",
",",
"preset_mode",
":",
"str",
")",
":",
"self",
".",
"_zone",
".",
"set_preset",
"(",
"preset_mode",
")",
"self",
".",
"_signal_zone_update",
"(",
")"
] | [
385,
4
] | [
388,
34
] | python | en | ['en', 'pt', 'en'] | True |
NexiaZone.turn_aux_heat_off | (self) | Turn. Aux Heat off. | Turn. Aux Heat off. | def turn_aux_heat_off(self):
"""Turn. Aux Heat off."""
self._thermostat.set_emergency_heat(False)
self._signal_thermostat_update() | [
"def",
"turn_aux_heat_off",
"(",
"self",
")",
":",
"self",
".",
"_thermostat",
".",
"set_emergency_heat",
"(",
"False",
")",
"self",
".",
"_signal_thermostat_update",
"(",
")"
] | [
390,
4
] | [
393,
40
] | python | en | ['en', 'mt', 'en'] | True |
NexiaZone.turn_aux_heat_on | (self) | Turn. Aux Heat on. | Turn. Aux Heat on. | def turn_aux_heat_on(self):
"""Turn. Aux Heat on."""
self._thermostat.set_emergency_heat(True)
self._signal_thermostat_update() | [
"def",
"turn_aux_heat_on",
"(",
"self",
")",
":",
"self",
".",
"_thermostat",
".",
"set_emergency_heat",
"(",
"True",
")",
"self",
".",
"_signal_thermostat_update",
"(",
")"
] | [
395,
4
] | [
398,
40
] | python | en | ['fr', 'et', 'en'] | False |
NexiaZone.turn_off | (self) | Turn. off the zone. | Turn. off the zone. | def turn_off(self):
"""Turn. off the zone."""
self.set_hvac_mode(OPERATION_MODE_OFF)
self._signal_zone_update() | [
"def",
"turn_off",
"(",
"self",
")",
":",
"self",
".",
"set_hvac_mode",
"(",
"OPERATION_MODE_OFF",
")",
"self",
".",
"_signal_zone_update",
"(",
")"
] | [
400,
4
] | [
403,
34
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.turn_on | (self) | Turn. on the zone. | Turn. on the zone. | def turn_on(self):
"""Turn. on the zone."""
self.set_hvac_mode(OPERATION_MODE_AUTO)
self._signal_zone_update() | [
"def",
"turn_on",
"(",
"self",
")",
":",
"self",
".",
"set_hvac_mode",
"(",
"OPERATION_MODE_AUTO",
")",
"self",
".",
"_signal_zone_update",
"(",
")"
] | [
405,
4
] | [
408,
34
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.set_hvac_mode | (self, hvac_mode: str) | Set the system mode (Auto, Heat_Cool, Cool, Heat, etc). | Set the system mode (Auto, Heat_Cool, Cool, Heat, etc). | def set_hvac_mode(self, hvac_mode: str) -> None:
"""Set the system mode (Auto, Heat_Cool, Cool, Heat, etc)."""
if hvac_mode == HVAC_MODE_AUTO:
self._zone.call_return_to_schedule()
self._zone.set_mode(mode=OPERATION_MODE_AUTO)
else:
self._zone.call_permanent_ho... | [
"def",
"set_hvac_mode",
"(",
"self",
",",
"hvac_mode",
":",
"str",
")",
"->",
"None",
":",
"if",
"hvac_mode",
"==",
"HVAC_MODE_AUTO",
":",
"self",
".",
"_zone",
".",
"call_return_to_schedule",
"(",
")",
"self",
".",
"_zone",
".",
"set_mode",
"(",
"mode",
... | [
410,
4
] | [
419,
39
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.set_aircleaner_mode | (self, aircleaner_mode) | Set the aircleaner mode. | Set the aircleaner mode. | def set_aircleaner_mode(self, aircleaner_mode):
"""Set the aircleaner mode."""
self._thermostat.set_air_cleaner(aircleaner_mode)
self._signal_thermostat_update() | [
"def",
"set_aircleaner_mode",
"(",
"self",
",",
"aircleaner_mode",
")",
":",
"self",
".",
"_thermostat",
".",
"set_air_cleaner",
"(",
"aircleaner_mode",
")",
"self",
".",
"_signal_thermostat_update",
"(",
")"
] | [
421,
4
] | [
424,
40
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone.set_humidify_setpoint | (self, humidity) | Set the humidify setpoint. | Set the humidify setpoint. | def set_humidify_setpoint(self, humidity):
"""Set the humidify setpoint."""
self._thermostat.set_humidify_setpoint(humidity / 100.0)
self._signal_thermostat_update() | [
"def",
"set_humidify_setpoint",
"(",
"self",
",",
"humidity",
")",
":",
"self",
".",
"_thermostat",
".",
"set_humidify_setpoint",
"(",
"humidity",
"/",
"100.0",
")",
"self",
".",
"_signal_thermostat_update",
"(",
")"
] | [
426,
4
] | [
429,
40
] | python | en | ['en', 'mg', 'en'] | True |
NexiaZone._signal_thermostat_update | (self) | Signal a thermostat update.
Whenever the underlying library does an action against
a thermostat, the data for the thermostat and all
connected zone is updated.
Update all the zones on the thermostat.
| Signal a thermostat update. | def _signal_thermostat_update(self):
"""Signal a thermostat update.
Whenever the underlying library does an action against
a thermostat, the data for the thermostat and all
connected zone is updated.
Update all the zones on the thermostat.
"""
dispatcher_send(
... | [
"def",
"_signal_thermostat_update",
"(",
"self",
")",
":",
"dispatcher_send",
"(",
"self",
".",
"hass",
",",
"f\"{SIGNAL_THERMOSTAT_UPDATE}-{self._thermostat.thermostat_id}\"",
")"
] | [
431,
4
] | [
442,
9
] | python | en | ['en', 'en', 'en'] | True |
NexiaZone._signal_zone_update | (self) | Signal a zone update.
Whenever the underlying library does an action against
a zone, the data for the zone is updated.
Update a single zone.
| Signal a zone update. | def _signal_zone_update(self):
"""Signal a zone update.
Whenever the underlying library does an action against
a zone, the data for the zone is updated.
Update a single zone.
"""
dispatcher_send(self.hass, f"{SIGNAL_ZONE_UPDATE}-{self._zone.zone_id}") | [
"def",
"_signal_zone_update",
"(",
"self",
")",
":",
"dispatcher_send",
"(",
"self",
".",
"hass",
",",
"f\"{SIGNAL_ZONE_UPDATE}-{self._zone.zone_id}\"",
")"
] | [
444,
4
] | [
452,
80
] | python | co | ['ro', 'co', 'en'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.