Code Monkey home page Code Monkey logo

homeassistant-config's Introduction

homeassistant-config's People

Contributors

ludeeus avatar pippyn avatar pnbruckner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-config's Issues

Release notes for custom components missing

Usually custom components are each put in their own repo, so Custom Updater is pointed at the repo's release page. But in this case all the custom components are in one repo which has no releases. Need to add release info for each custom component so Custom Updater has something to display.

Illuminance: Add other choices for source of weather conditions

WU has stopped giving out free API keys, and I've heard that their REST API will stop working at the end of the year. HA's YR component already provides an "icon" (symbol) number that represents the current weather conditions. Add an option to use that as the source instead of WU.

Life360: Handle comm errors during setup

During setup if comm errors are encountered the platform will give up and loading will fail. If comm errors occur, come up with some way to retry at least a few times (e.g., raise PlatformNotReady.)

Should call see on every update

Further analysis of the device tracker component code, and other device tracker platforms, seems to indicate that the platform code should call see() on every update, even if the data is not newer than the last time. If this is not done, then it could affect how the component level code "merges" multiple device tracker platforms for a given device. See this discussion for some more details.

Filter repeated error messages

If there's a repeating error for a given member, it would be nice to not flood the log with that message. Maybe just show it normally the first time. Then if it happens again on the next update, write an ERROR to the log saying it repeated and further repetitions will not be shown, but rather an INFO message will be written when the error stops.

Philips Hue - color_temp

Dude this is awesome. Although I came across an issue where if the lights colour had been set by HA's color_temp slider, only the brightness value was saved because when this slider is used the RGB/hs_color values are left empty. I'm using Philips Hue so it might be different with other lights?

Essentially to fix this, I added the color_temp field to the attributes.

I changed line 13 from

LIGHT_ATTRS = [ATTR_BRIGHTNESS, ATTR_HS_COLOR]

to

ATTR_HS_COLORTEMP = "color_temp"
LIGHT_ATTRS = [ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_HS_COLORTEMP]

I've adjusted your script below and have linked it:
light_store.txt

Life360: Event type too long for mysql recorder

From the logs:

Error executing query: (_mysql_exceptions.DataError) (1406, "Data too long for column 'event_type' at row 1") [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (%s, %s, %s, %s, %s, %s, %s)'] [parameters: ('device_tracker.life360_update_overdue', '{"entity_id": "device_tracker.life360_ABBADABBA"}', 'LOCAL', datetime.datetime(2018, 10, 24, 15, 35, 27, 241056, tzinfo=<UTC>), datetime.datetime(2018, 10, 24, 15, 35, 27, 243863), '69903c9481a3485299ab0e14549e059b', None)] (Background on this error at: http://sqlalche.me/e/9h9h) 11:35 AM components/recorder/util.py (ERROR)

Life360 On Docker - get_circles: ReadTimeout

I have just tried getting the life360 custom component to work in Docker (not sure if it is Docker that is causing the issue??)

The component seems to load correctly however nothing happens.

When looking at the traceback, I can see this error:

2018-11-28 14:26:41 ERROR (SyncWorker_7) [custom_components.device_tracker.life360] get_circles: ReadTimeout: HTTPSConnectionPool(host='api.life360.com', port=443): Read timed out. (read timeout=11.0)

config file is a textbook extract from the example hosted in this wiki (I am using email not phone number for username).

Latest version of HomeAssistant (0.82.1)

Handle 'tracking disabled' when member is in multiple circles

Firstly, this is fantastic. Cheers!

Here's our setup: Two circles, one with just the wife and I, and the other with the two of us and the kids. The wife and I have location sharing disabled within the second circle, so we can monitor the kids, but they can't monitor us. HA is correctly tracking the kids, but since we have location sharing disabled in one circle, it's not grabbing our location from the other. Thoughts?

device tracker was not updating timely

For some reason since the last update (1.5.0), device_tracker entities were not updated quickly. In some cases status was not updated for more than an hour.

I added automations to test entities based on their speed but they were not triggered at all.

My config file entries:

device_tracker:
  - platform: life360
    username: !secret life360_username
    password: !secret life360_password
    prefix: life360
    show_as_state: driving, moving, places
    driving_speed: 8
    max_update_wait:
      minutes: 15
    interval_seconds: 10
    filename: life360.conf

I commented out max_update_wait settings but still the same. Are there any settings that were needed to be adjusted?

TIA

Life360: Add MQTT support

please consider creating and adding the mqtt feature for the component.

On the forum Ive explained my experiences with the 2 composite trackers I use now, being this CC and a mqtt setup made out of indivual components like in this CC, albeit manually.

The main difference would be the use of mqtt. This enables me to use the attribute and state values of the CC on other systems as well! Very very convenient.

Would be way cool if you could add that to the CC features.
consider it a feature request ;-)

Originally posted by @hvbhome in #23 (comment)

Life360: driving attribute doesn't seem to work

Currently the driving attribute is derived from the member's ['location']['isDriving'] field, but this always seems to be '0', even when the member is moving in a car.

A suggestion has been made (see this HA community post) to determine the driving status based on the value of the member's ['location']['speed'] field.

Life360: First update too long after restart

Since the platform code does not perform an update immediately at startup the component level code will have a chance to restore the previous state of the device_tracker entities from the database, but these states are obviously stale, possibly significantly depending on how long HA has not been running, and they only contain a subset of all the entity's attributes (the common set defined by the component level code.) Platform code should perform an update as soon as it is initialized and not wait for the first periodic execution.

Life360: Create/update HA zones based on Life360 Places

If it's possible to retrieve Place definitions from the Life360 server, then use them to automatically create (or update???) corresponding HA zones. Make this a configurable option. Then remove places from show_as_state, because it would no longer be necessary.

Members with single name

If a member only has a First Name or a Last Name in Life360, just that one name, with no comma, should be allowed in the members config list. When retrieved members are checked against this list, they should match if they only have one name and it matches the single name in the members list.

Composite with Life360 attributes

Thanks for these great addons :)

It would be nice to get some more of the detail from the Life360 tracker in to the composite tracker. Namely, the speed, moving, wifi_on, and entity_picture attributes.

Multiple accounts of life360

I have multiple accounts for life360 members, i don´t want my family know my gps position.

When I use this configuration, all device_trackers use only one account of life360.

is posible to use multiple accounts?

Thnks and sorry for my english

configuration.yaml

device_tracker:

  • platform: life360
    prefix: fernando
    username: [email protected]
    password: !secret life360_fernando_password
    interval_seconds: 10
    add_zones: false
    max_update_wait:
    minutes: 30
  • platform: life360
    prefix: raquel
    username: [email protected]
    password: !secret life360_raquel_password
    interval_seconds: 10
    add_zones: false
    max_update_wait:
    minutes: 30
  • platform: life360
    prefix: mamen
    username: [email protected]
    password: !secret life360_mamen_password
    interval_seconds: 10
    add_zones: false
    max_update_wait:
    minutes: 30
  • platform: life360
    prefix: carmen
    username: [email protected]
    password: !secret life360_carmen_password
    interval_seconds: 10
    add_zones: false
    max_update_wait:
    minutes: 30

Unable to restore mclighting

So it doesn't seem to restore the state, it worked fine on my Bruh lights, but the mclighting ones just keep flashing.

I'm pretty sure that mclighting is case sensitive for the effects.

i've saved the state and here is the section of the core.restore_state

    {
        "last_seen": "2019-01-02T20:54:47.005770+00:00",
        "state": {
            "attributes": {
                "brightness": 92,
                "color_temp": 400,
                "effect": "Static",
                "effect_list": [
                    "Static",
                    "Blink",
                    "Breath",
                    "Color Wipe",
                    "Color Wipe Inverse",
                    "Color Wipe Reverse",
                    "Color Wipe Reverse Inverse",
                    "Color Wipe Random",
                    "Random Color",
                    "Single Dynamic",
                    "Multi Dynamic",
                    "Rainbow",
                    "Rainbow Cycle",
                    "Scan",
                    "Dual Scan",
                    "Fade",
                    "Theater Chase",
                    "Theater Chase Rainbow",
                    "Running Lights",
                    "Twinkle",
                    "Twinkle Random",
                    "Twinkle Fade",
                    "Twinkle Fade Random",
                    "Sparkle",
                    "Flash Sparkle",
                    "Hyper Sparkle",
                    "Strobe",
                    "Strobe Rainbow",
                    "Multi Strobe",
                    "Blink Rainbow",
                    "Chase White",
                    "Chase Color",
                    "Chase Random",
                    "Chase Rainbow",
                    "Chase Flash",
                    "Chase Flash Random",
                    "Chase Rainbow White",
                    "Chase Blackout",
                    "Chase Blackout Rainbow",
                    "Color Sweep Random",
                    "Running Color",
                    "Running Red Blue",
                    "Running Random",
                    "Larson Scanner",
                    "Comet",
                    "Fireworks",
                    "Fireworks Random",
                    "Merry Christmas",
                    "Fire Flicker",
                    "Fire Flicker (soft)",
                    "Fire Flicker (intense)",
                    "Circus Combustus",
                    "Halloween",
                    "Bicolor Chase",
                    "Tricolor Chase",
                    "ICU",
                    "Custom 0",
                    "Custom 1",
                    "Custom 2",
                    "Custom 3"
                ],
                "friendly_name": "McLighting01",
                "hs_color": [
                    28.865,
                    72.549
                ],
                "max_mireds": 500,
                "min_mireds": 153,
                "rgb_color": [
                    255,
                    159,
                    70
                ],
                "supported_features": 63,
                "xy_color": [
                    0.546,
                    0.389
                ]
            },
            "context": {
                "id": "1aed1ae5102841dfbd5a60bc950a97cf",
                "user_id": null
            },
            "entity_id": "light.mclighting01",
            "last_changed": "2019-01-02T20:39:38.852250+00:00",
            "last_updated": "2019-01-02T20:54:00.019547+00:00",
            "state": "on"
        }
    },

Life360 status when device offline

If a device being tracked by the Life360 device tracker platform goes offline -- e.g., is turned off or airplane mode is turned on -- currently the status of the device_tracker entity does not change until the device comes back online. It might be nice, if possible, for the platform to detect the device is offline and change the corresponding device_tracker entity in some way to indicate this. E.g., it might set the state to 'offline' so the device will not appear to be 'home', in another zone (if it was), etc.

Amcrest: Empty SDCard throws error

I see that you have a PR to merge your enhancements into the standard Amcrest component - that's great! I'm using your custom code and it's working nicely, but I'm happy to see it officially incorporated.

One very slight issue I ran into that can easily be ignored, but thought it would be good to point out. If a new SDCard is installed (or not present) the sensor logic for reporting the SDCard disk usage throws an index error and no sensor entity is created.

Does it make sense to include a fix for this to be included in your PR? If not, you can close this as it's really a minor issue that should go away once data is written to the card.

2019-01-11 08:27:25 ERROR (MainThread) [homeassistant.components.sensor] amcrest: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/amcrest.py", line 103, in update
    sd_used = self._camera.storage_used
  File "/usr/local/lib/python3.6/site-packages/amcrest/storage.py", line 39, in storage_used
    status = [s for s in ret.split() if '.UsedBytes=' in s][0]
IndexError: list index out of range

Composite tracker: AttributeError with tzinfo

Traceback (most recent call last):
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/device_tracker/composite.py", line 106, in _update_info
    new_state.last_updated))
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/util/dt.py", line 66, in as_utc
    if dattim.tzinfo == UTC:
AttributeError: 'int' object has no attribute 'tzinfo'

Hassio Error:

So... i created the directory tree with life360.py on device_tracker folder. I added to my configuration.yaml

device_tracker:

  • platform: life360
    username: !secret life360_username
    password: !secret life360_password
    add_zones: all
    max_gps_accuracy: 200
    prefix: life360
    show_as_state: driving, moving, places

I get this error when restarting ha:

2019-02-17 19:28:03 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package timezonefinderL==2.0.1: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/timezonefinderl/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/timezonefinderl/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/timezonefinderl/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/timezonefinderl/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/timezonefinderl/
Could not find a version that satisfies the requirement timezonefinderL==2.0.1 (from versions: )
No matching distribution found for timezonefinderL==2.0.1
2019-02-17 19:28:03 ERROR (MainThread) [homeassistant.requirements] Not initializing device_tracker.life360 because could not install requirement timezonefinderL==2.0.1
2019-02-17 19:28:03 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform device_tracker.life360: Could not install all requirements.

Any help ?

Composite tracker: Add support for network-based trackers

The component level device tracker code has provisions for merging updates from one or more network-based trackers and a GPS-based one by assigning the same MAC address to the GPS-based tracker in known_devices.yaml. However, network-based trackers suffer from the fact that many, if not most, battery operated devices (like cell phones) tend to stop responding to pings, etc. for sometimes long periods of time (presumably to save battery charge), and hence it's not uncommon for these network-based trackers to change state to 'not_home', even though the device is still home.

So far the composite device tracker platform only supports GPS-based trackers. But if it allowed network-based trackers as well, their 'not_home' to 'home' transitions could be used to more quickly change the composite tracker to 'home' (before the GPS-based trackers get around to updating to 'home'.) And since the network-based 'home' to 'not_home' transitions tend to be fairly unreliable, and are a guess at best, they would just be ignored.

Members not removed

I've removed two members from the Life360 app two days ago, but they still appear on HA. I've restarted but they're still there. Any suggestions wecome. Thanks

Composite tracker: Accept 'battery_level' and add 'battery_charging'

Google Maps Location Sharing reports battery level in the non-standard 'battery_level' attribute instead of the standard 'battery' attribute. Look for both. If either is found, pass it in the standard battery parameter of the see method.

Add support for a battery charging attribute. Look for either 'battery_charging' (which google_maps uses) or 'charging' (which I used in my Life360 platform), and report in a new 'battery_charging' attribute.

Life360: inconsistent last_seen updates

I have the following template to track 'last_seen' but that value is inconsistent. I am not sure if this was because of Life360 or issue with the template.

      tmpl_aaa_loc_updated_at:
        friendly_name: A's Location Changed At
        value_template: "{{relative_time(states.device_tracker.life360_aaa.attributes.last_seen)}}"
        entity_id: device_tracker.life360_aaa

8:14 PM A's Location Changed At changed to 12 months
8:08 PM A changed to Driving
7:48 PM A changed to location 2
7:47 PM A's Location Changed At changed to 12 months
7:43 PM A changed to location 1
7:41 PM A's Location Changed At changed to 3 seconds
7:28 PM A changed to Moving

Error installing requirements for life360.py

Hi,
After I upgraded from 2.3 to 2.5, I see the following error in my log:

Jan 31 06:55:33 raspberrypi hass[31028]: 2019-01-31 06:55:33 INFO (Thread-7) [pyupdate.ha_custom.custom_components] Upgrading life360==2.*timezonefinderL==2.*
Jan 31 06:55:38 raspberrypi hass[31028]: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Jan 31 06:55:38 raspberrypi hass[31028]: Collecting life360==2.*timezonefinderL==2.*
Jan 31 06:55:40 raspberrypi hass[31028]:   Could not find a version that satisfies the requirement life360==2.*timezonefinderL==2.* (from versions: 2.0.0.dev2, 2.0.0)
Jan 31 06:55:40 raspberrypi hass[31028]: No matching distribution found for life360==2.*timezonefinderL==2.*
Jan 31 06:55:41 raspberrypi hass[31028]: 2019-01-31 06:55:41 INFO (Thread-7) [pyupdate.ha_custom.custom_components] upgrade_single finished: "device_tracker.life360"

I have absolutely no idea why it's stripping the , and trying to install one package instead of two, and other files seem to install their requirements just fine. Any ideas what might be wrong?

life360 not work in docker rpi image

2018-11-30 17:22:45 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform life360
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/init.py", line 184, in async_setup_platform
disc_info)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/device_tracker/life360.py", line 126, in setup_scanner
from life360 import life360
ModuleNotFoundError: No module named 'life360'

Composite tracker needs thread locking

The composite tracker's update method might be called multiple times very closely in time if multiple input entities change state closely in time. To avoid the method possibly running multiple times concurrently, which could cause an improper update, it probably needs thread locking added.

Multiple composite tracker support?

Hey, I really love what you did here! I was wondering if it was possible to add multiple composite trackers for different people? I've been using binary sensors for when my family visits, along with using monitor and tile to check if my dog if home too. I like the composite tracker a lot more though

illuminance broken in 0.85

Using both the sensor.dark_sky_icon and the weather.dark_sky do not work. This was working in 0.84.6.

2019-01-10 13:45:44 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sensor.illuminance. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/loader.py", line 92, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/root/.homeassistant/custom_components/sensor/illuminance.py", line 19, in <module>
    from homeassistant.components.sensor.darksky import (
ImportError: cannot import name 'CONF_ATTRIBUTION'
2019-01-10 13:45:44 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.illuminance

'moving' while at home

HI,

Just noticed that the 'moving' attribute was 'true', while being 'Home' for rather a long while. Not sure if this is a bug, or a direct consequence of settings in device_tracker 'consider home' or Life360 setup, but might be worth having a second look.

I noticed it because I based the imagery of certain tiles on that attribute.... and it obviously wasn't correct ;-)
It cant have been the fact the device wasn't last seen shortly enough, since it did change the state to Home correctly.

Life360: Delay events at startup

If a member's last seen timestamp from the server exceeds max_update_wait at startup, the event will be fired at that time. However, this happens before automations are ready, so it will be missed. Delay events until automations are likely ready.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.