From 17b5b61441165e5920b6f21cb3dbfbc7efe078f3 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sun, 29 Oct 2017 00:07:47 +0000 Subject: [PATCH] Site updated at 2017-10-29 00:07:46 UTC --- atom.xml | 2 +- blog/categories/announcements/atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/iot-data/atom.xml | 2 +- blog/categories/media/atom.xml | 2 +- blog/categories/merchandise/atom.xml | 2 +- blog/categories/micropython/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- .../device_tracker.owntracks/index.html | 2 +- components/media_player.samsungtv/index.html | 1 + developers/python_api/index.html | 63 ++++++++++++--- developers/rest_api/index.html | 70 +++++++++------- .../customizing-devices/index.html | 2 +- docs/configuration/state_object/index.html | 4 +- sitemap.xml | 80 +++++++++---------- 31 files changed, 161 insertions(+), 109 deletions(-) diff --git a/atom.xml b/atom.xml index d40fb55026..01d831e3c3 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index 928fca061a..be5575c24b 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 52cb275a3f..692bc4cb8f 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 70aeb8ea9e..7ee836ad3b 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 45b33b25d4..681457e80c 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index bde961e8d3..eb6db3d8d6 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 0224f1b71f..362ea3f9b1 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index f7ff866669..fca1225bc5 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 178e8e8739..e7c1c7cb8e 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/media/atom.xml b/blog/categories/media/atom.xml index 7d6c796cfe..bad063f47f 100644 --- a/blog/categories/media/atom.xml +++ b/blog/categories/media/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Media | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 35ff6df4b1..4e1c218636 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 6e5971868b..b10a83ff55 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 3081129b68..ab47ec2556 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 2a068771e6..48e0e96de2 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index d8aed25c17..227f906b17 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 7e5629c5d3..8cfa4b4b09 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 15e2836779..279591ba51 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 8f6271ba29..4c331019e7 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 60377bcef3..516417fc9d 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index c3939720b6..efb4492f9f 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 1c7a75d1e2..0c01bff267 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 9324d579c8..ad10bd3f9a 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 6dad500457..afddad4e7a 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 7f6b70c468..da1b6c51f6 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-10-28T23:36:19+00:00 + 2017-10-28T23:52:30+00:00 https://home-assistant.io/ diff --git a/components/device_tracker.owntracks/index.html b/components/device_tracker.owntracks/index.html index 5dbe58e995..3b74582e52 100644 --- a/components/device_tracker.owntracks/index.html +++ b/components/device_tracker.owntracks/index.html @@ -86,7 +86,7 @@
  • max_gps_accuracy (Optional): Sometimes Owntracks can report GPS location with a very low accuracy (few kilometers). That can trigger false zoning in your Home Assistant installation. With the parameter, you can filter these GPS reports. The number has to be in meter. For example, if you put 200 only GPS report with an accuracy under 200 will be take in account.
  • waypoints (Optional): Owntracks users can define waypoints (a.k.a regions) which are similar in spirit to Home Assistant zones. If this configuration variable is True, the Owntracks users who are in waypoint_whitelist can export waypoints from the device and Home Assistant will import them as zone definitions. Defaults to True.
  • -
  • waypoint_whitelist (Optional): A list of user names (as defined for Owntracks) who can export their waypoints from Owntracks to Home Assistant. Defaults to all users who are connected to Home Assistant via Owntracks.
  • +
  • waypoint_whitelist (Optional): A list of user names (as defined for Owntracks) who can export their waypoints from Owntracks to Home Assistant. This would be the username portion of the Base Topic Name, (e.g. owntracks/username/iPhone). Defaults to all users who are connected to Home Assistant via Owntracks.
  • secret (Optional): Payload encryption key. This is usable when communicating with a third-party untrusted server or a public server (where anybody can subscribe to any topic). By default the payload is assumed to be unencrypted (although the communication between Home Assistant and the server might still be encrypted). This feature requires the libsodium library to be present.

A full sample configuration for the owntracks platform is shown below:

diff --git a/components/media_player.samsungtv/index.html b/components/media_player.samsungtv/index.html index 22f3d28594..1caf58a565 100644 --- a/components/media_player.samsungtv/index.html +++ b/components/media_player.samsungtv/index.html @@ -111,6 +111,7 @@
  • U6300 (port must be set to 8001, and pip3 install websocket-client must be executed)
  • K6500AF (port must be set to 8001)
  • KS8005 (port must be set to 8001, and pip3 install websocket-client must be executed)
  • +
  • KS7502 (port must be set to 8001, and pip3 install websocket-client must be executed, turn on doesn’t work, turn off works fine)
  • K5600AK (partially supported, turn on works but state is not updated)
  • Currently tested but not working models:

    diff --git a/developers/python_api/index.html b/developers/python_api/index.html index 2dc5e59b03..d937be1b04 100644 --- a/developers/python_api/index.html +++ b/developers/python_api/index.html @@ -94,7 +94,7 @@

    Get details about services, events, and entitites

    -

    The output from this is similar to the output you’d find via the frontend, using the DevTools console.

    +

    The output from this is similar to the output you’d find via the frontend, using the Developer Tools.

    import homeassistant.remote as remote
     
     api = remote.API('127.0.0.1', 'YOUR_PASSWORD')
    @@ -120,12 +120,11 @@
     
    import homeassistant.remote as remote
     
     api = remote.API('127.0.0.1', 'YOUR_PASSWORD')
    -office_temperature = remote.get_state(api, 'sensor.office_temperature')
    -print('{} is {} {}.'.format(office_temperature.name,
    -                            office_temperature.state,
    -                            office_temperature.attributes['unit_of_measurement']
    -                            )
    -      )
    +office_temp = remote.get_state(api, 'sensor.office_temperature')
    +print('{} is {} {}.'.format(
    +    office_temp.name, office_temp.state,
    +    office_temp.attributes['unit_of_measurement'])
    +)
     

    This outputs the details which are stored for this entity, ie:

    @@ -137,10 +136,9 @@ api = remote.API('127.0.0.1', 'YOUR_PASSWORD') switch_livingroom = remote.get_state(api, 'switch.livingroom_pin_2') -print('{} is {}.'.format(switch_livingroom.name, - switch_livingroom.state - ) - ) +print('{} is {}.'.format( + switch_livingroom.name, switch_livingroom.state) +)

    Set the state of an entity

    @@ -213,6 +211,49 @@ longer timeout.

    remote.call_service(api, domain, 'jabber', data) +

    Examples

    +

    This section contains a couple of sample scripts.

    +

    List all sensors and their value

    +

    If you want to see, export or list all sensor states then an easy way to do it, is to get all entities and filter for the one you are looking for.

    +
    import homeassistant.remote as remote
    +
    +api = remote.API('127.0.0.1', 'YOUR_PASSWORD')
    +entities = remote.get_states(api)
    +for entity in entities:
    +    if entity.entity_id.startswith('sensor'):
    +        data = remote.get_state(api, entity.entity_id)
    +        print('{}: {}'.format(data.attributes['friendly_name'], data.state))
    +
    +
    +

    Show difference between last_changed and last_updated

    +

    The documentation about the State Objects describes the +last_changed and last_updated fields. This example shows how it works in practice.

    +
    import time
    +
    +from prettytable import PrettyTable
    +import homeassistant.remote as remote
    +
    +api = remote.API('127.0.0.1', 'YOUR_PASSWORD')
    +
    +ACTIONS = {
    +    'Create sensor': [21, 'Test'],
    +    'No new sensor value': [21, 'Test'],
    +    'New sensor value': [22, 'Test'],
    +    'Update attribute': [22, 'Test1'],
    +}
    +
    +output = PrettyTable(['Action', 'Last changed', 'Last updated'])
    +
    +for key, value in ACTIONS.items():
    +    remote.set_state(api, 'sensor.test', new_state=value[0],
    +                     attributes={'friendly_name': value[1]})
    +    data = remote.get_state(api, 'sensor.test')
    +    output.add_row([key, data.last_changed, data.last_updated])
    +    time.sleep(2)
    +
    +print(output)
    +
    +