Coder Social home page Coder Social logo

ha-sensor-sl's People

Contributors

fredrikbaberg avatar fuffenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

dsorlov

ha-sensor-sl's Issues

Non nummerical lines

The settings do not accept non-nummerical lines such as X busses, C busses etc. Line numbers should be accepted both as text and nummerics.

sensor fails on start

When following the instructions in the readme, including adding the custom component, I get the following results:

Wed Jan 16 2019 13:43:33 GMT+0100 (Central European Standard Time)

Update for sensor.sl_stureby fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  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 "/config/custom_components/sensor/sl.py", line 158, in update
    if self._enabled_sensor is None or sensor_state.state is STATE_ON:
AttributeError: 'NoneType' object has no attribute 'state'

This is my configuration.yaml

# Sensors
sensor:
  # Weather prediction
  - platform: yr
  - platform: sl
    name: stureby
    ri4key: MyAPIKEY
    siteid: 9164
    lines: 17, 18, 19
    direction: 1
    sensor: binary_sensor.test

Add traffic messages sensor

Add sensor for messages about traffic problems för certain lines as specified in config with a lovelace card for displaying them

Card enhancements for lovelace

Beeing able to controll the lovelace card more in style, such as:

  • setting title of card
  • icon column for type of transportation
  • selecting columns to output
  • number of lines rendered
  • render empty rows?

Poll intervall

Should be able to specify intervalls for polling the api due to restrictions, this in contrast to using a binary sensor which could also be usefull

Showing incorrect lines

If you choose Odenplan as station and then add line 43 (which is the "Pendel-tåg") you will also get line 4 (the bus) even thou you haven´t stated that. Do you have any fix for this? See attached files that you can see that it shows that next line is number 4 but I have not stated that line in the setup

setup
line43

Feature request

At the moment only the 2 upcoming departures are being shown. I think it would be a great addition if the sensor could show all the upcoming departures were real time info is available.

A real life example:
My house is a 6-7 minute walk from the train station. If I would use the sensor during rush hours for all trains going north, the 2 departures that are displayed in the current version of the sensor would most likely already have departed before I have a theoretical chance of getting to the station. But if the sensor would have shown all the available real time information then I would have been able to see the trains that I actually would be able to take.

If this feature would be implemented I would think it would be great if there was a sensor attribute added to show how many real time entries are available. That way it would be easier to make some clever scheme for visualizing the traffic information in the UI.

Best regards
Fredrik

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.