Code Monkey home page Code Monkey logo

ha_custom_filters's Introduction

Thanks to Buy Me A Coffee

ha_custom_filters's People

Contributors

blizzrdof77 avatar zvldz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ha_custom_filters's Issues

no license

Your license file is empty, perhaps use MIT?

Adding this component intermittently fails configuration checks

Home Assistant version: 0.118.3
ha_custom_filters version: 3c805de

I'm running into an odd problem with this component. It works fine during normal use, but occasionally trips up my github actions based configuration checking run with the following error:

Failed config
  sensor.mqtt: 
    - Invalid config for [sensor.mqtt]: invalid template (TemplateAssertionError: no filter named 'decode_valetudo_map') for dictionary value @ data['json_attributes_template']. Got "{% if 'class' in value[1:10] %} {{ value }} {% else %} {{ value | decode_valetudo_map }} {% endif %}". (See ?, line ?). 
    - platform: mqtt
      json_attributes_template: {% if 'class' in value[1:10] %} {{ value }} {% else %} {{ value | decode_valetudo_map }} {% endif %}
      json_attributes_topic: valetudo/downstairs-rockrobo/map_data
      name: downstairs_roborock_map
      state_topic: valetudo/downstairs-rockrobo/state
      value_template: OK
    - Invalid config for [sensor.mqtt]: invalid template (TemplateAssertionError: no filter named 'decode_valetudo_map') for dictionary value @ data['json_attributes_template']. Got "{% if 'class' in value[1:10] %} {{ value }} {% else %} {{ value | decode_valetudo_map }} {% endif %}". (See ?, line ?). 
    - platform: mqtt
      json_attributes_template: {% if 'class' in value[1:10] %} {{ value }} {% else %} {{ value | decode_valetudo_map }} {% endif %}
      json_attributes_topic: valetudo/upstairs-rockrobo/map_data
      name: upstairs_roborock_map
      state_topic: valetudo/upstairs-rockrobo/state
      value_template: OK

My best guess is that this is because the custom filters component is likely not getting installed before the mqtt sensors are processed.

Any suggestions on resolving this?

Works as global, but not as filter

I'm having some trouble getting this to work.

I've added via Hacs. Testing in dev tools, the functions work as globals, but not as filters.

Works: {{ get_type('foo bar baz') }}
Fails: {{ 'foo bar baz' | get_type }}, error: TemplateAssertionError: No filter named 'get_type'.

Any ideas?

This is with Home Assistant installed on a raspberry pi.

Bidi algorithm support

I attempted to open a pull request, but unfortunately, the associated feature was closed.

Consequently, I have initiated a new filter. It would be highly beneficial to incorporate a filter supporting the bidi algorithm, particularly for the display of RTL text (predominantly for Arabic and Hebrew).

The pertinent Python package is 'python-bidi,' housing the 'get_display' function within the 'bidi.algorithm' module.

For example:
Input string = שלום
Out = םולש

https://pypi.org/project/python-bidi/

randomly not working at restart (more often than OK)

Hi,

after updating to 2023.3, I have a big issue : I cannot use this integration :
image

I installed a development environment in vscode + docker desktop, and I can reproduce this behaviour ... sort of.
I only need to restart the debug environment ( stop + F5 or click this icon :
image
)

and One time, it will work, next start it will not work ... on my production env (rpi4) it never works anymore. Seems to be a startup order issue but I cannot yet understand how to fix it, would you mind looking at it please ?

No Issue put a question

Hey i found your costume Filter and i want you to ask if you could help me.
I need to convert a hex string in Home Assistant to Base64. I tried to modify yout filter but no success.
Would be nice if you could help me.

For example: My Hex String is 01000258 and it should be "AQACWA==".

I tried:
def b64encode(string):
data = string.encode("UTF-8")
return base64.b64encode(data)

but no success.
Would be nice if you could help me.
Tanks :)

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.