* Move group to it's own setup
* Let each component to handle restore of state
* Move constants for climate into const.py
For now import all into __init__.py to keep backword compat
* Move media plyaer constants to const.py file
For now import all constants into __init__.py to keep
backword compatibility
* Move media player to it's own file
* Move climate to it's own file
* Remove ecobee service from common components
BREAKING CHANGE
* Add tests for climate
* Add test for media_player
* Make sure we clone timestamps of state
* Add tests for groups
* Remove old tests for media player, it's handled by other tests
* Add tests for calls to component functions
* Add docstring for climate const
* Add docstring for media_player const
* Explicitly import constants in climate
* Explicitly import constants in media_player
* Add period to climate const
* Add period to media_player const
* Fix some lint errors in climate
* Fix some lint errors in media_player
* Fix lint warnings on climate tests
* Fix lint warnings on group tests
* Fix lint warnings on media_player tests
* Fix lint warnings on state tests
* Adjust indent for state tests
* Add type hints to helpers.intent and location
* Test typing for helpers.icon, json, and typing
* Add type hints to helpers.state
* Add type hints to helpers.translation
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
## Description:
This feature adds possibly of setting tilt_position in scene for covers.
**Related issue (if applicable):** fixes #<home-assistant issue number goes here>
**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
## Example entry for `configuration.yaml` (if applicable):
```yaml
scene:
- name: Close Cover Tilt
entities:
cover.c_office_north:
tilt_position: 0
- name: Open Cover Tilt
entities:
cover.c_office_north:
tilt_position: 100
```
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)
If the code communicates with devices, web services, or third-party tools:
- [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
- [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
- [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
- [ ] New files were added to `.coveragerc`.
If the code does not interact with devices:
- [ ] Tests have been added to verify that the new code works.
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54
* Export climate metrics to Prometheus.
This adds climate_state and temperature_c metrics for each climate
device.
* Add more climate states to state_as_number
Prometheus (https://prometheus.io/) is an open source metric and alerting
system. This adds support for exporting some metrics to Prometheus, using
its Python client library.
* ecobee_set_fan_min_on_time: fix issue using 'entity_id' field and add service field help text
* climate.ecobee: add 'resume_program' service
* Add default value for resume_all and correct entity_id field name reference
This adds support for the scene component to handle input_select
devices and set their options.
This fixes bug #4673
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add open/closed state mapping for open_cover and close_cover
* Add 'open', 'closed' for open/close_cover_tilt
* Revert "Add 'open', 'closed' for open/close_cover_tilt"
This reverts commit e45582d439.
* Add mysensors IR switch device and service
* Add MySensorsIRSwitch as child class to MySensorsSwitch.
* Add platform specific service mysensors_send_ir_code. Only call
device method in service function if device is IR device.
* Add service and required attribute to state helper to support scenes.
* Move V_IR_SEND type from sensor.mysensors to switch.mysensors
platform.
* Populate switch.services.yaml with service descriptions.
* Fix check of entity_id in service function
Since multiple entity_ids can be passed as service data, and the
entity_id service attribute is forced to a list by the service
validation schema, the check in the service function should iterate
over any entity ids.
* Add tests to reach full coverage for helpers/state.py.
* Refactor reproduce_state function in helpers/state.py. Add two dicts,
as global constants, service_attributes and service_to_state. Use
these in combination with the dict of services per domain from
ServiceRegistry, to find the correct service to use in a scene state
change.
* Use break statement in for loop, to break if service was selected
to update state, in preference to update state attributes, ie state
update takes precedence.
* Add ATTR_CODE and ATTR_CODE_FORMAT in const. Import these in
alarm_control_panel and lock platforms instead of making duplicate
constants in multiple modules.
* Use ATTR_MEDIA_CONTENT_TYPE and ATTR_MEDIA_CONTENT_ID in media_player
platform in SERVICE_PLAY_MEDIA and play_media methods, instead of
'media_type' and 'media_id'.
* Fix PEP257 in modified files.
This adds state_as_number(), a helper method that tries to interpret
state as a number, for cases we can predict. It's a generalization of
what is copy-and-paste-ed into multiple other places.