• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

home-assistant / home-assistant / 17355
94%

Build:
DEFAULT BRANCH: dev
Ran 05 Jan 2017 09:09PM UTC
Jobs 5
Files 188
Run time 12min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
17355

push

travis-ci

balloob
Update keyboard_remote.py (#5112)

* Update keyboard_remote.py

I changed os.path.isFile() to os.path.exists: as far as I know isFile doesn't work with device files. At least on my Ubuntu it wasn't working.

Then I added some error control in case the keyboard disconnects: with bluetooth keyboards this happen often due to battery saving. Now it reconnects automatically when the keyboard wakes up.

We could fire an event to hass when the keyboard connects-disconnects, maybe I'll do this later.

We should also manage errors due to permissions problems on the device file, or at least give some info in the docs about how to allow HA to grab control over an system input file.

I'm sorry if my coding isn't up to some standard practice I'm not aware of: I'm new to HA and to python itself, I'm just trying to be of help.
Gianluca

* Update keyboard_remote.py

I changed some other few things.

Not the component gets loaded even if the keyboard is disconnected. When it connects, it starts to fire events when keys are pressed.

I also added a sleep(0.1) that reduces a lot the load on the CPU, but without many consequences on key pressed detection.

15499 of 16563 relevant lines covered (93.58%)

2.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 17355.1 (TOXENV=py34) 05 Jan 2017 09:12PM UTC 0
93.57
Travis Job 17355.1
2 17355.2 (TOXENV=requirements) 05 Jan 2017 09:09PM UTC 0
Travis Job 17355.2
3 17355.3 (TOXENV=lint) 05 Jan 2017 09:16PM UTC 0
Travis Job 17355.3
5 17355.5 (TOXENV=py35) 05 Jan 2017 09:21PM UTC 0
93.56
Travis Job 17355.5
6 17355.6 (TOXENV=py36) 05 Jan 2017 09:21PM UTC 0
93.55
Travis Job 17355.6
Source Files on build 17355
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #17355
  • 95ddef31 on github
  • Prev Build on dev (#17348)
  • Next Build on dev (#17357)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc