hass-core/tests
Nathan Henrie 2109b7a1b9 Use entity_id for backend, friendly name for frontend (#4343)
* Use entity_id for backend, friendly name for frontend

Closes https://github.com/home-assistant/home-assistant/issues/3434

Command line switches had the option to set a `friendly_name` reportedly
for use in the front end. However, if set, it was also being used as the
`entity_id`.

This did not seem like obvious behavior to me. This PR changes the
behavior so the entity_id is the object_id, which must already be
unique, and is an obvious place to have a very predictable slug (even if
long or unsightly), and the friendly name (if set) is used for the
display.

Example:

```yaml
switch:
  platform: command_line
  switches:
    rf_kitchen_light_one:
      command_on: switch_command on kitchen
      command_off: switch_command off kitchen
      command_state: query_command kitchen
      value_template: '{{ value == "online" }}'
      friendly_name: "Beautiful bright kitchen light!"
```

If you were using in an automation or from dev tools, would use:
`switch.rf_kitchen_light_one`, but your front end would still show `Beautiful
bright kitchen light!`

* Add new arg to test_assumed_state_should_be_true_if_command_state_is_false

* Import ENTITY_ID _FORMAT from existing, rename device_name to object_id

* Rename `device_name` to `object_id`

* Test that `entity_id` and `name` are set as expected
2016-11-12 22:46:23 -08:00
..
components Use entity_id for backend, friendly name for frontend (#4343) 2016-11-12 22:46:23 -08:00
fixtures Unittests for ddwrt device tracker and bugfix (#3996) 2016-10-24 22:18:24 -07:00
helpers Hotfix deadlock on platform setup (#4354) 2016-11-12 16:19:13 -08:00
resources Revised package util tests 2016-01-30 14:08:32 -05:00
scripts http: reimplement X-Forwarded-For parsing (#4355) 2016-11-12 16:14:39 -08:00
test_util Async version of Yr.no (#4158) 2016-11-02 19:34:12 -07:00
testing_config/custom_components Exclude tests in dependencies in test dir from pytest (#2618) 2016-07-25 08:26:07 -07:00
util Remove None value before writing known_devices (#4098) 2016-11-01 21:51:31 -07:00
__init__.py async HTTP component (#3914) 2016-10-23 23:48:01 -07:00
common.py Change pending task sheduler to time based cleanup (#4324) 2016-11-09 08:41:17 -08:00
conftest.py async HTTP component (#3914) 2016-10-23 23:48:01 -07:00
test_bootstrap.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
test_config.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
test_core.py Change pending task sheduler to time based cleanup (#4324) 2016-11-09 08:41:17 -08:00
test_loader.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
test_main.py Migrate core from threads to async awesomeness (#3248) 2016-09-12 19:16:14 -07:00
test_remote.py More async tests (#4223) 2016-11-05 16:36:20 -07:00