core/homeassistant/components
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
..
alarm_control_panel Fix alarm.com I/O inside properties (#4307) 2016-11-08 19:57:46 -08:00
automation Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
binary_sensor Add timeout for Netatmo binary sensor (#4280) 2016-11-10 23:04:11 -08:00
camera Use hass aiohttp connector for ssl connection (#4344) 2016-11-12 16:00:31 -08:00
climate Fix typo in generic thermostat (#4348) 2016-11-11 17:42:58 +01:00
cover Fix mysensors overwriting gateway in GATEWAYS (#4013) 2016-11-06 10:49:43 -08:00
device_tracker Added NVRAM-based MAC to IP mapping as backup to ARP tables (#4189) 2016-11-10 22:46:58 -08:00
fan Make services yield (#4187) 2016-11-03 18:32:14 -07:00
frontend Version bump to 0.32.0 2016-11-05 08:40:32 -07:00
light Add support for rgb light in led flux, fixes issue #4303 (#4332) 2016-11-10 21:30:52 -08:00
lock Make services yield (#4187) 2016-11-03 18:32:14 -07:00
media_player fix panasonic viera doing I/O in event loop (#4341) 2016-11-10 21:17:44 -08:00
mqtt MQTT.Server will use HASS eventloop (#3429) 2016-11-10 22:45:38 -08:00
notify iOS links (#4295) 2016-11-08 00:07:24 +01:00
recorder Upgrade sqlalchemy to 1.1.3 (#4277) 2016-11-07 23:08:17 -08:00
scene Use port instead of url and fix PEP257 issues (#4192) 2016-11-03 18:43:42 -07:00
sensor Don't fail if component name is None. Fixes (#4345) 2016-11-12 14:16:27 -08:00
switch Use entity_id for backend, friendly name for frontend (#4343) 2016-11-12 22:46:23 -08:00
weather Fix OWM async I/O (#4298) 2016-11-08 18:57:56 -08:00
zwave Fix initialization of zwave color bulbs (#4085) 2016-10-29 17:14:28 -07:00
__init__.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
alexa.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
apcupsd.py 0.27.2 (#3151) 2016-09-03 15:59:20 -07:00
api.py async HTTP component (#3914) 2016-10-23 23:48:01 -07:00
arduino.py Upgrade PyMata to 2.13 (#3335) 2016-09-13 22:52:11 -07:00
bloomsky.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
browser.py Fix linting errors 2016-07-16 23:45:38 -07:00
configurator.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
conversation.py Upgrade fuzzywuzzy to 0.14.0 (#4240) 2016-11-06 07:36:03 -08:00
demo.py Async EntitiesComponent (#3820) 2016-10-16 09:35:46 -07:00
device_sun_light_trigger.py More async tests (#4223) 2016-11-05 16:36:20 -07:00
digital_ocean.py Upgrade python-digitalocean to 1.10.1 (#4276) 2016-11-06 23:49:25 -08:00
discovery.py Updated netdisco to 0.7.6 (#4250) 2016-11-06 10:43:13 -08:00
downloader.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
dweet.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
ecobee.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
emoncms_history.py Maintenance 2nd (#4106) 2016-10-30 09:58:34 +01:00
emulated_hue.py http: reimplement X-Forwarded-For parsing (#4355) 2016-11-12 16:14:39 -08:00
enocean.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
envisalink.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
feedreader.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
ffmpeg.py Update ha-ffmpeg to version 0.15 (#4096) 2016-10-29 00:12:53 +02:00
foursquare.py async HTTP component (#3914) 2016-10-23 23:48:01 -07:00
graphite.py Use voluptuous for graphite (#2929) 2016-08-23 19:01:46 -07:00
group.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
hdmi_cec.py 0.28 (#3288) 2016-09-10 18:22:58 -07:00
history.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
homematic.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
http.py http: reimplement X-Forwarded-For parsing (#4355) 2016-11-12 16:14:39 -08:00
ifttt.py 0.28 (#3288) 2016-09-10 18:22:58 -07:00
influxdb.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
input_boolean.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
input_select.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
input_slider.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
insteon_hub.py Disable insteon hub (#4221) 2016-11-04 23:38:27 -07:00
introduction.py Check that no configuration is provided (#3553) 2016-09-29 19:02:22 -07:00
ios.py iOS links (#4295) 2016-11-08 00:07:24 +01:00
isy994.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
joaoapps_join.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
keyboard.py Comment out pyuserinput in requirements_all (#3307) 2016-09-11 21:59:48 -07:00
keyboard_remote.py Recieve signals from a keyboard and use keyboard as a remote control (#3305) 2016-09-17 23:31:27 -07:00
knx.py Fix KNX async I/O (#4267) 2016-11-08 21:00:33 -08:00
lirc.py Update python-lirc to 1.2.3 (#3784) 2016-10-10 23:44:41 -07:00
litejet.py Use port instead of url and fix PEP257 issues (#4192) 2016-11-03 18:43:42 -07:00
logbook.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
logentries.py Migrate to voluptuous (#2927) 2016-08-23 17:27:54 -07:00
logger.py Remove globally disabled pylint warnings (#4204) 2016-11-03 18:40:43 -07:00
mochad.py Add mochad component (#3970) 2016-10-24 21:49:49 -07:00
modbus.py Modbus component refactoring - sensors and switches (#3297) 2016-09-13 22:47:44 +02:00
mqtt_eventstream.py We need to allow extra keys on the top-level component config. 2016-04-07 00:42:56 -04:00
mysensors.py Fix mysensors overwriting gateway in GATEWAYS (#4013) 2016-11-06 10:49:43 -08:00
nest.py Refactory nest component/platforms (#4219) 2016-11-04 20:22:47 -04:00
netatmo.py Add timeout for Netatmo binary sensor (#4280) 2016-11-10 23:04:11 -08:00
nuimo_controller.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
octoprint.py Stop Octoprint from logging errors during startup (#4220) 2016-11-05 07:55:59 -07:00
openalpr.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
panel_custom.py Minor changes (#2784) 2016-08-11 11:14:24 +02:00
panel_iframe.py Tweak panel parameters (#2746) 2016-08-07 21:56:17 -07:00
persistent_notification.py Async cleanup part 3 (#4302) 2016-11-07 22:31:40 -08:00
pilight.py Remove globally disabled pylint warnings (#4204) 2016-11-03 18:40:43 -07:00
proximity.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
qwikswitch.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
rfxtrx.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
rpi_gpio.py Use voluptuous for RPi GPIO (#3371) 2016-09-17 23:28:37 -07:00
script.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
scsgate.py Use voluptuous for SCSGate (#3265) 2016-09-13 07:23:53 +02:00
services.yaml Add service to change visibility of a group (#3998) 2016-10-29 16:54:26 -07:00
shell_command.py Optimize template 2 (#3521) 2016-09-27 21:29:55 -07:00
sleepiq.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
splunk.py Use voluptuous for Splunk (#2931) 2016-08-23 18:58:59 -07:00
statsd.py Fixed statsd stopping if state is not numeric or only attributes changed (#3981) 2016-10-21 23:18:13 -07:00
sun.py Upgrade astral to 1.3 (#4238) 2016-11-06 07:36:16 -08:00
tellduslive.py Don't fail if component name is None. Fixes (#4345) 2016-11-12 14:16:27 -08:00
tellstick.py Maintenance 2nd (#4106) 2016-10-30 09:58:34 +01:00
thingspeak.py Maintenance 2nd (#4106) 2016-10-30 09:58:34 +01:00
updater.py Upgrade distro to 1.0.1 (#4239) 2016-11-06 14:00:41 +02:00
upnp.py Check that no configuration is provided (#3553) 2016-09-29 19:02:22 -07:00
vera.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
verisure.py Disable too-many-* (#4107) 2016-10-30 22:18:53 +01:00
weblink.py Fix issue #3401 weblink (#3402) 2016-09-17 23:21:24 -07:00
wemo.py Bump pywemo version - changes port order for faster startup. (#3612) 2016-10-01 22:53:24 -07:00
wink.py Revert "Catch AttributeError on Wink PubNub update" (#4263) 2016-11-06 20:05:42 -08:00
zeroconf.py Check that no configuration is provided (#3553) 2016-09-29 19:02:22 -07:00
zigbee.py Remove ThreadPool with async executor (#4154) 2016-11-05 09:27:55 -07:00
zone.py Async gather wait (#4247) 2016-11-06 09:26:40 -08:00
zoneminder.py Maintenance zoneminder (#4102) 2016-10-29 13:10:42 -07:00