diff --git a/atom.xml b/atom.xml index be29644897..7cd2bee17c 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
some-topi
-Keep an eye on ratining messages to keep the state as you don’t want to unlock your door by accident when you restart something.
+Keep an eye on retaining messages to keep the state as you don’t want to unlock your door by accident when you restart something.
For a check you can use the command line tools mosquitto_pub
shipped with mosquitto
to send MQTT messages. This allows you to operate your lock manually:
The mqtt
switch platform let you control your MQTT enabled switch.
In an ideal scenario, the MQTT device will have a state topic to publish state changes. If these messages are published with RETAIN flag, the MQTT switch will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state of the switch will be false/off.
+In an ideal scenario, the MQTT device will have a state_topic
to publish state changes. If these messages are published with RETAIN
flag, the MQTT switch will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state of the switch will be false/off.
When a state topic is not available, the switch will work in optimistic mode. In this mode, the switch will immediately change state after every command. Otherwise, the switch will wait for state confirmation from device (message from state_topic
).
When a state_topic
is not available, the switch will work in optimistic mode. In this mode, the switch will immediately change state after every command. Otherwise, the switch will wait for state confirmation from device (message from state_topic
).
Optimistic mode can be forced, even if state topic is available. Try to enable it, if experiencing incorrect switch operation.
@@ -115,7 +115,7 @@true
if no state_topic
defined, else false
.some-topi
-For a check you can use the command line tools mosquitto_pub
shipped with mosquitto
to send MQTT messages. This allows you to operate your cover manually:
For a check you can use the command line tools mosquitto_pub
shipped with mosquitto
to send MQTT messages. This allows you to operate your switch manually:
$ mosquitto_pub -h 127.0.0.1 -t home/bedroom/switch1set -m "ON"
diff --git a/cookbook/python_component_basic_state/index.html b/cookbook/python_component_basic_state/index.html
index 0921c6f2b4..61c26ead51 100644
--- a/cookbook/python_component_basic_state/index.html
+++ b/cookbook/python_component_basic_state/index.html
@@ -184,22 +184,20 @@ The component will only write a log message. Keep in mind for later that you hav
Thanks to DEFAULT_TEXT
variable the component will launch even if no text:
field is used in the configuration.yaml
file. Quite often there are variables which are required. It’s important to check if all mandatory configuration variables are provided. If not, the setup should fail. We will use the validate_config
function as a helper to achive this. The next listing shows the essential parts.
Thanks to DEFAULT_TEXT
variable the component will launch even if no text:
field is used in the configuration.yaml
file. Quite often there are variables which are required. It’s important to check if all mandatory configuration variables are provided. If not, the setup should fail. We will use voluptuous
as a helper to achive this. The next listing shows the essential parts.
from homeassistant.helpers import validate_config
+import voluptuous as vol
+
+import homeassistant.helpers.config_validation as cv
[...]
- if not validate_config(config, {DOMAIN: [CONF_TEXT]}, _LOGGER):
- return False
+PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
+ vol.Required(CONF_TEXT): cv.string,
+})
If text:
is missing, there will be a warning in the log file.
-16-03-12 14:37:37 ERROR (MainThread) [custom_components.hello_state] Missing required configuration items in hello_state: text
-16-03-12 14:37:37 ERROR (MainThread) [homeassistant.bootstrap] component hello_state failed to initialize
-
-
-
After a start or a restart of Home Assistant the component will be visible in the frontend if the configuration.yaml
file is up-to-date.
diff --git a/sitemap.xml b/sitemap.xml
index d6af1c2f1e..0ac4406da5 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2499,62 +2499,62 @@
https://home-assistant.io/demo/frontend.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/index.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00
https://home-assistant.io/static/mdi-demo.html
-2016-12-27T12:30:53+00:00
+2016-12-27T19:33:24+00:00