Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UniFi - Add more logging to help future debug situations #29800

Merged
merged 1 commit into from Dec 11, 2019

Conversation

@Kane610
Copy link
Member

Kane610 commented Dec 9, 2019

Breaking Change:

Description:

Related issue (if applicable): fixes #

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@Kane610 Kane610 added this to the 0.103.0 milestone Dec 9, 2019
@Kane610 Kane610 self-assigned this Dec 9, 2019
@project-bot project-bot bot added this to Needs review in Dev Dec 9, 2019
LOGGER.debug(
"Updating UniFi tracked client %s\n%s",
self.entity_id,
pformat(self.client.raw),

This comment has been minimized.

Copy link
@balloob

balloob Dec 11, 2019

Member

this is ok for now, but you might want to check that it's logged before writing, as now you're formatting something that is most likely thrown out. Example: https://github.com/NabuCasa/hass-nabucasa/blob/dev/hass_nabucasa/iot_base.py#L90-L91

This comment has been minimized.

Copy link
@Kane610

Kane610 Dec 11, 2019

Author Member

I will add that with a future.pr. Thanks

@balloob balloob merged commit 856dd63 into home-assistant:dev Dec 11, 2019
11 of 12 checks passed
11 of 12 checks passed
codecov/patch 85.71% of diff hit (target 94.49%)
Details
CI #20191209.117 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/project 94.49% (target 90%)
Details
docs-missing Documentation ok.
Dev automation moved this from Needs review to Done Dec 11, 2019
balloob added a commit that referenced this pull request Dec 11, 2019
frenck added a commit that referenced this pull request Dec 11, 2019
* [ci skip] Translation update

* Move imports to top for usgs_earthquakes_feed (#29202)

* Move imports to top for syncthru (#29206)

* Move imports to top for tapsaff (#29205)

* Move imports to top for tautulli (#29204)

* Move imports to top for tof (#29203)

* Move imports to top for tof

* Isorted imports

* Move imports to top for volvooncall (#29201)

* Move imports to top for vultr (#29200)

* Upgrade youtube_dl to 2019.11.28 (#29199)

* Move imports to top for wirelesstag (#29198)

* Move imports to top for zabbix (#29195)

* Move imports to top for zhong_hong (#29194)

* Move imports to top for ziggo_mediabox_xl (#29193)

* Handle None when trucating long Environment Canada state values (#29208)

* Handle None when trucating long state values, add info message

* Black

* Move imports to top for xiaomi_aqara (#29196)

* Move imports to top for xiaomi (#29197)

* Migrate NSW Rural Fire Service integration to async library (#29181)

* use async integration library

* adapted unit tests

* removed unused constants

* relocated constants

* simplified generation of new entries

* small code fixes

* increased test coverage and removed unused code

* fixed comment

* simplified patch code

* Fix somfy switch inherit from SwitchDevice instead of ToggleEntity (#29182)

* Allow controlling Tado Hot Water Devices with temperature control (#29191)

* Fix smartthings cloud webhook (#29219)

* Fix smartthings cloud webhook

* Update smartapp.py

* Allow turning off a tado water heater (#29221)

* Move imports to top for switchbot (#29229)

* Move imports to top for starlingbank (#29233)

* Move imports to top for tahoma (#29232)

* Move imports to top for synologdsm (#29231)

* Move imports to top for synology (#29230)

* Move imports to top for supla (#29226)

* Move imports to top for streamlabswater (#29225)

* Move imports to top for stiebel_eltron (#29224)

* Move imports to top for swiss_hydrological_data (#29227)

* Move imports to top for swiss_public_transport (#29228)

* Move imports to top for swiss_public_transport

* Remove import of exceptions since only one exception is used

* [ci skip] Translation update

* Address DSMR Reader review notes (#29209)

* Fix review issues

* Remove None from get method

* No longer need logging import

* Give definition without name a default name

* Move imports to top for simplisafe (#29262)

* [ci skip] Translation update

* Move imports to top for route53 (#29273)

* Move imports to top for roomba (#29272)

* Move imports to top for rpi_rf (#29271)

* Move imports to top for rova (#29269)

* Move imports to top for russound_rnet (#29268)

* Move imports to top for russound_rio (#29267)

* Move imports to top for rpi_gpio_pwm (#29270)

* Move imports to top for sabnzbd (#29266)

* Move imports to top for satel_integra (#29263)

* Move imports to top for simplepush (#29261)

* Move imports to top for sht31 (#29260)

* Move imports to top for sensehat (#29259)

* Move imports to top for tradfri (#29247)

* Move imports to top for spider (#29249)

* Move imports to top for sochain (#29250)

* Move imports to top for smarty (#29251)

* Move imports to top for sisyphus (#29252)

* Move imports to top for scsgate (#29257)

* Neato reduce API calls (#29156)

* initial commit

* Fix a bug where some values are not available

* Workaround if git_robot_info() is not available

* Fix Espalexa being detected as Hue Bridge (#29237)

* Add device trigger for alarm_control_panel (#29068)

* Added device trigger to alarm control panel

* Added supported features to check that device has certain trigger

* Fixed tests for device_trigger

* Fixed pylint error

* Removed pending trigger and removed trigger condition

* Fix Hue linking with non ASCII chars in location (#29213)

* Fix Hue linking with non ASCII chars in location

* Use slugify

* Move imports to top for sense (#29258)

* Stop Plex config flow imports where more user input needed (#29241)

* Abort imports that require user interaction, update logs and tests

* Disable lint

* Add Huawei LTE binary sensor support, mobile connection sensor (#28226)

* Add Huawei LTE binary sensor support, mobile connection sensor

* Improve mobile connection sensor icon docstring

* Remove device class for permission to use a more descriptive icon

* Move imports to top for roku (#29289)

* Move imports to top for raincloud (#29283)

* Move imports to top for rocketchat (#29288)

* Upgrade Tibber library (#29290)

* Move imports to top for ripple (#29287)

* Move imports to top for remote_rpi_gpio (#29286)

* Move imports to top for recswitch (#29285)

* Move imports to top for raspyrfm (#29284)

* Add ATEN PE component for ATEN eco PDUs (#27960)

* Add ATEN PE component for ATEN eco PDUs

* aten_pe: Require host configuration

* aten_pe: Do not import from other integrations

* aten_pe: Include unnamed outlets

* aten_pe: Avoid get() for config entries having default values

* aten_pe: Fix documentation URI

* aten_pe: Remove unused return value

* aten_pe: Update atenpdu lib to 0.2.0 for asyncio

* aten_pe: Raise exception if initialization fails

* aten_pe: Update atenpdu lib to 0.3.0 for improved exception handling

* Upgrade mypy to 0.750 (#29294)

https://mypy-lang.blogspot.com/2019/11/mypy-0.html

* Move imports to top for seventeentrack (#29264)

* Move imports to top for seventeentrack

* Updated patch target path in test_sensor.py

* Improve naming and attrs of hostnameless Huawei LTE device tracker entities (#29281)

* Limit parallel requests to Philips Hue (#29189)

* Limit parallel requests to Philips Hue

* Fix tests

* Remove loop

* Update homeassistant/components/hue/bridge.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Move intent registration to own integration (#29280)

* Move intent registration to own integration.

* Lint

* [ci skip] Translation update

* Overhaul Emulated Hue (#28317)

* Emulated Hue Overhaul

* Fix erroneous merge

* Remove unused code

* Modernize string format

* Add name option to season sensor (#29302)

* Add name option to season sensor

* Changed DEFAULT_NAME from season to Season

* Add capability-attributes (#29306)

* Clear miflora sensor state on exception (#29276)

* Clear state on exception

Clear state if querying the device fails. The state is then set to unknown, so it can be tracked if a miflora device isn't responding any more.

* Add available()

Signal valid data via available()

* Inline MQTT paho imports (#29177)

* Inline MQTT paho imports

* Address comments

* Fix patch paths

* Move other imports inline

* Fix test

* Update service domains for xiaomi_miio from base domains to xiaomi_miio domain (#29134)

* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain

* update service names

* try to fix black error

* try black formatting again

* final black formatting attempt

* update service names to reflect platform

* fix typo

* Add Emulated Hue code owner (#29319)

* Broadlink remote (#26528)

* Add broadlink remote control platform

* Fix order of the imports

* Add remote.py to .coveragerc

* Optimize MAC address validation

* Use storage helper class and improve code readability

* Add me to the manifest as a code owner

* Fix dosctring

* Add me to the code owners

* Remove storage schemas, rename storage keys and improve readability

* Move imports to top for python_script (#29331)

* Move imports to top for postnl (#29330)

* Move imports to top for prezzibenzina (#29329)

* Move imports to top for quantum_gateway (#29327)

* Move imports to top for qnap (#29326)

* Move imports to top for qbittorrent (#29325)

* Move imports to top for plum_lightpad (#29324)

* Move imports to top for rachio (#29323)

* Improve Alexa interface selection for binary sensors (#29120)

* Improve Alexa interface selection for binary sensors

This allows the sensor to work correctly as a contact or motion sensor
in alexa, if the user overrides its display category as such.

* add tests

* Add alexa check for "name" channelMetadata attribute (#29279)

* Added check for "name" channelMetada attribute

* Added/changed smart home media player tests for added value name in chanelMetadata payload section

* Since Alexa only expects a number/callSign/affiliate in the returned response, returning "name" is not technically valid.  Modified to return the value in the callSign field  instead since it's a text value. Since there is no returned channel number, cannot return a true numeric value in "channel" field

* Move imports to top for qwikswitch (#29328)

* Move imports to top for radarr (#29322)

* Improve WLED white value support for RGBW strips (#29312)

* delete incorrect "mdi:brightness-3" (#29309)

delete incorrect 'mdi:brightness-3' in final 
```
def icon(self):
        """Icon to use in the frontend, if any."""
        return MOON_ICONS.get(self.state, "mdi:brightness-3")
```

which still shows in the sensors attributes

* Do not select all entities when omitting entity ID in service call (#29178)

* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test

* [ci skip] Translation update

* Update heatmiserv3 integration (#29006)

* Updated heatmiserV3 initial commit

* Fixing heatmiser component

* Updated codeowners and heatmiserV3 version

* Updating files as part of PR process

* Removed extra _LOGGER statements.

* Added in HVAC_MODE_OFF to allowed states to track whether heating on/off

* Handling PR comments

* Removed legacy tests

* fixing pylint errors

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/heatmiser/climate.py

Removed .get from config

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Updated climate based on latest feedback

* Removed cast to int and update requirements

* Update requirements

* Updated heatmiser deps

* Google assistant storage of connected agents (#29158)

* Make async_report_state take agent_user_id

* Attempt to store synced agents

* Drop now not needed initialization

* Make sure cloud uses the all sync on changed preferences

* Some more places to use all version of sync

* Get the agent_user_id from the request context if available

* Minor cleanup

* Remove the old fixed agent_user_id for cloud

Instead pass along cloud_user where appropriate.

* async_delay_save takes a function

* Adjust test for delayed store

* Remove unused save function

* Add login check.

* Lint

* Report unavailable entities to google (#28501)

* Report unavailable entites to google.

Entities should only removed when removed from HA. Removing a temporarily unavailable entity from google causes it to need to re-configured once it become available again.

* Fix test for unavailable entities

* Add initial test suite for arcam_fmj integration (#29335)

* Add initial tests

* Adjust test

* Typo

* Fix uvloop warning (#29341)

* Update ozw 0.1.6

* Move imports to top for pushetta (#29332)

* Move imports to top for pushetta

* Make Pushetta.exceptions import lowercase and snakecase

* Move imports to top for pencom (#29348)

* Include telegram_bot message id for all messages (#29315)

* Include telegram_bot message id for all messages

* Update __init__.py

* Ignore state of climate entities in prometheus (#29346)

* Move imports to top for owlet (#29352)

* Rendering complex template objects to leave non-template values alone (#29353)

* Move imports to top for opple (#29372)

* Move imports to top for orvibo (#29371)

* Move imports to top for nut (#29368)

* Move imports to top for mycroft (#29355)

* Upgrade enturclient to 0.2.1 (#29375)

* Remove cloud dependency from mobile_app (#29373)

* Move imports to top for opensensemap (#29370)

* Move imports to top for mystrom (#29356)

* Move imports to top for nello (#29361)

* Move imports to top for nederlandse_spoorwegen (#29360)

* Move imports to top for nanoleaf (#29359)

* Move imports to top for nad (#29358)

* Move imports to top for n26 (#29357)

* Move imports to top for netdata (#29362)

* Move imports to top for netio (#29363)

* Move imports to top for nmap_tracker (#29364)

* Move imports to top for nmbs (#29365)

* Move imports to top for noaa_tides (#29366)

* Move imports to top for nuimo_controller (#29367)

* Move imports to top for openhome (#29369)

* [ci skip] Translation update

* Allow negative altitude in location updates (#29381)

* Move imports to top for lametric (#29406)

* Move imports to top for lacrosse (#29405)

* Move imports to top for kwb (#29404)

* Move imports to top for kiwi (#29403)

* Move imports to top for iota (#29399)

* Move imports to top for lauch_library (#29383)

* Move imports to top for lg_netcast (#29384)

* Move imports to top for lightwave (#29385)

* Move imports to top for limitlessled (#29386)

* Move imports to top for london_underground (#29387)

* Move imports to top for luci (#29388)

* Move imports to top for lutron (#29389)

* Move imports to top for lutron_caseta (#29390)

* Move imports to top for lyft (#29391)

* Move imports to top for matrix (#29392)

* Move imports to top for maxcube (#29393)

* Move imports to top for meteo_france (#29394)

* Move imports to top for microsoft (#29395)

* Move imports to top for modem_callerid (#29396)

* Move imports to top for keenetic-ndms2 (#29400)

* Move imports to top for irish_rail_transport (#29401)

* Move imports to top for joaoapps_join (#29402)

* Upgrade psutil to 5.6.7 (#29407)

* Move imports to top for iglo (#29424)

* Move imports to top for idteck_prox (#29423)

* Move imports to top for gogogate2 (#29411)

* Move imports to top for gogogate2

* Isorted imports

* Move imports to top for hydrawise (#29421)

* Move imports to top for ihc (#29425)

* Move imports to top for ialarm (#29422)

* Move imports to top for gitter (#29412)

* Move imports to top for homeworks (#29418)

* Move imports to top for gpmdp (#29413)

* Move imports to top for greeneye_monitor (#29414)

* Move imports to top for gstreamer (#29415)

* Move imports to top for habitica (#29416)

* Move imports to top for hikvision (#29417)

* Move imports to top for horizon (#29419)

* Move imports to top for horizon

* Fix Pylint redefining name keys

* Move imports to top for hunterdouglas_powerview (#29420)

* Move imports to top for gearbest (#29432)

* Move imports to top for fleetgo (#29431)

* Move imports to top for fints (#29429)

* Move imports to top for fastdotcom (#29428)

* Move imports to top for familyhub (#29427)

* Move imports to top for etherscan (#29426)

* Move imports to top for fixer (#29430)

* Move imports to top for fixer

* Only import FixerioException instead of all exceptions

* Move imports to top for danfoss_air (#29435)

* Updated frontend to 20191204.0 (#29461)

* Move imports to top for litejet (#29481)

* Move imports to top for tuya (#29467)

* Move imports to top for zoneminder (#29468)

* Move imports to top for point (#29470)

* Move imports to top for ps4 (#29471)

* Move imports to top for rainmachine (#29472)

* Move imports to top for random (#29473)

* Move imports to top for ring (#29474)

* Move imports to top for skybell (#29475)

* Move imports to top for mhz19 (#29478)

* Move imports to top for mfi (#29479)

* Move imports to top for mailgun (#29480)

* Move imports to top for logi_circle (#29482)

* Move imports to top for hlk_sw16 (#29483)

* Move imports to top for history (#29484)

* Move imports to top for geo_json_events (#29486)

* Move imports to top for emulated_hue (#29488)

* Move imports to top for deconz (#29489)

* Move imports to top for daikin (#29490)

* Move imports to top for somfy_mylink (#29464)

* Move imports to top for solaredge (#29463)

* Move imports to top for entur_public_transport (#29459)

* Move imports to top for environment_canada (#29458)

* Move imports to top for sonarr (#29462)

* Fix setup of Huawei LTE for which we can't get a MAC address (#29455)

Closes #29188

* Move imports to top for emby (#29453)

* Move imports to top for eq3btsmart (#29456)

* Move imports to top for enigma2 (#29452)

* Move imports to top for enocean (#29451)

* Move imports to top for envisalink (#29457)

* Move imports to top for enphase_envoy (#29450)

* Move imports to top for egardia (#29448)

* Move imports to top for eight_sleep (#29447)

* Update eternalegypt to 0.0.11 (#29446)

* Move imports to top for duke_energy (#29445)

* Move imports to top for dunehd (#29444)

* Move imports to top for dlink (#29443)

* Move imports to top for doorbird (#29442)

* Move imports to top for directv (#29441)

* Move imports to top for datadog (#29440)

* Move imports to top for deluge (#29438)

* Move imports to top for clementine (#29437)

* Move imports to top for asuswrt (#29436)

* Move imports to top for canary (#29449)

* Fix litejet tests

* Fix deconz import

* Fix tests & lint

* Switch iperf3 to generate a new client every time it runs a test (#29495)

* Switch iperf3 to generate a new client every time it runs a test

* Add myself to CODEOWNERS

* Fix imperative mood

* Update pyhomematic (#29477)

* Version bump to 0.103.0dev0

* Bumped version to 0.103.0b0

* Increase somfy SCAN_INTERVAL (#29524)

- There was too many errors 504

* Limit available heat/cool modes for HomeKit thermostats (#28586)

* Limit available heat/cool modes for HomeKit thermostats.
The Home app only shows appropriate modes (heat/cool/auto) for the device. Depending on the climate integration, disabling the auto start might be needed.

* Include improved mapping for HVAC modes in tests

* Bump georss_generic_client to 0.3 (#29532)

* bump version of georss_generic_client library

* updated requirements

* Huawei LTE device tracker fixes (#29551)

* Include MAC address in device state attributes for absent devices too

* Use MAC address as default name whether device is connected or not

* Fix initialization of known entities

Closes #29354

* Change source of device_info (#29570)

* Only update disabled_by when enabled default and entity enabled states differ (#29643)

* Fix unit_of_measurement for Starline temperature sensors (#29740)

* HomeAssistant-pyozw 0.1.7 (#29743)

* Updated frontend to 20191204.1 (#29787)

* Bump Roku to 4.0.0 (#29809)

* Bumped version to 0.103.0b1

* Add user-agent to fix dwd_weather_warnings setup error (#29596)

* Added dummy user-agent to http request to fix setup error

* Replace dummy user-agent with the user-agent of the global home assistant session

* Adjust comment and rename user-agent constant

* Add more logging to help future debug situations (#29800)

* UniFi - honor detection time when UniFi wire bug happens (#29820)

* UniFi - Handle disabled switches (#29824)

* Remove uvloop event policy (#29835)

* Remove uvloop event policy

* Clean tests

* Fix lint

* Cleanup statment

* Bumped version to 0.103.0


Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
Co-authored-by: null <46536646+springstan@users.noreply.github.com>
Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
Co-authored-by: null <michael.davie@gmail.com>
Co-authored-by: Malte Franken <exxamalte@users.noreply.github.com>
Co-authored-by: null <thibaut@etienne.pw>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Michaël Arnauts <michael.arnauts@gmail.com>
Co-authored-by: Wim Haanstra <wim@wim.me>
Co-authored-by: null <tobhaase@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: null <jjlawren@users.noreply.github.com>
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
Co-authored-by: Andreas Oberritter <obi@saftware.de>
Co-authored-by: null <34781835+NobleKangaroo@users.noreply.github.com>
Co-authored-by: Christian Ferbar <5595808+ferbar@users.noreply.github.com>
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
Co-authored-by: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com>
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
Co-authored-by: Alain Turbide <7193213+Dilbert66@users.noreply.github.com>
Co-authored-by: Marius <33354141+Mariusthvdb@users.noreply.github.com>
Co-authored-by: Andy Loughran <andy@lockran.com>
@lock lock bot locked and limited conversation to collaborators Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
3 participants
You can’t perform that action at this time.