Skip to content

System Monitor Sensor shows IP4 address instead of MAC address#16394

Merged
fabaff merged 1 commit intohome-assistant:devfrom
ReneNulschDE:Fix_Systemmonitor_IP-address
Sep 4, 2018
Merged

System Monitor Sensor shows IP4 address instead of MAC address#16394
fabaff merged 1 commit intohome-assistant:devfrom
ReneNulschDE:Fix_Systemmonitor_IP-address

Conversation

@ReneNulschDE
Copy link
Copy Markdown
Contributor

Description:

On Windows, the IP4-address is not the first item in the list of addresses. This PR adds an additional address.family checks to select the right item in the list independent from the sorting of the list.

Related issue (if applicable): fixes #16231

Checklist:

  • The code change is tested and works locally. Tested on Windows 10 x64 and Linux Mint 19
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@ghost ghost added the in progress label Sep 3, 2018
@fabaff fabaff changed the title Fix SystemMonitor - Sensor shows mac-address instead of IP4-address System Monitor Sensor shows IP4 address instead of MAC address Sep 4, 2018
Copy link
Copy Markdown
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🐦

Test case on a Linux system:

sensor:
  - platform: systemmonitor
    resources:
      - type: ipv4_address
        arg: enp0s

@fabaff fabaff merged commit a4aa30f into home-assistant:dev Sep 4, 2018
@ghost ghost removed the in progress label Sep 4, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipv4 adress shows mac adress instead of IPadress

3 participants